diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-09 14:02:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-17 02:42:13 +0300 |
commit | 74f7cdcf6bb8032b6bf8881007e0344366849859 (patch) | |
tree | a81d8b9238a89a89345b0cf7fb21bb73ca31178e | |
parent | ab9bd557added48a1f46b9624b874a40b46b71d3 (diff) |
Volume object datablock skeleton code.temp-volume-object
This only adds Shift+A > Volume object and displays a list of grid names
in a specified VDB file. Branch pushed for reference if someone other than
me wants to pick up this project.
76 files changed, 2450 insertions, 58 deletions
diff --git a/intern/openvdb/intern/openvdb_reader.cc b/intern/openvdb/intern/openvdb_reader.cc index 8b15b81710d..8d6d5570e5b 100644 --- a/intern/openvdb/intern/openvdb_reader.cc +++ b/intern/openvdb/intern/openvdb_reader.cc @@ -122,6 +122,11 @@ openvdb::GridBase::Ptr OpenVDBReader::getGrid(const openvdb::Name &name) const return m_file->readGrid(name); } +openvdb::GridBase::Ptr OpenVDBReader::getGrid(size_t index) const +{ + return (*(m_file->getGrids()))[index]; +} + size_t OpenVDBReader::numGrids() const { return m_file->getGrids()->size(); diff --git a/intern/openvdb/intern/openvdb_reader.h b/intern/openvdb/intern/openvdb_reader.h index 07f77130ff9..9454569ccd5 100644 --- a/intern/openvdb/intern/openvdb_reader.h +++ b/intern/openvdb/intern/openvdb_reader.h @@ -49,6 +49,7 @@ public: bool hasGrid(const openvdb::Name &name) const; openvdb::GridBase::Ptr getGrid(const openvdb::Name &name) const; + openvdb::GridBase::Ptr getGrid(size_t index) const; size_t numGrids() const; }; diff --git a/intern/openvdb/openvdb_capi.cc b/intern/openvdb/openvdb_capi.cc index 1c8b51a23c4..50f0806eacf 100644 --- a/intern/openvdb/openvdb_capi.cc +++ b/intern/openvdb/openvdb_capi.cc @@ -240,3 +240,13 @@ void OpenVDBReader_get_meta_mat4(OpenVDBReader *reader, const char *name, float { reader->mat4sMeta(name, value); } + +size_t OpenVDBReader_num_grids(struct OpenVDBReader *reader) +{ + return reader->numGrids(); +} + +const char *OpenVDBReader_grid_name(struct OpenVDBReader *reader, size_t index) +{ + return reader->getGrid(index)->getName().c_str(); +} diff --git a/intern/openvdb/openvdb_capi.h b/intern/openvdb/openvdb_capi.h index fe7af82769b..cd42c60ee3a 100644 --- a/intern/openvdb/openvdb_capi.h +++ b/intern/openvdb/openvdb_capi.h @@ -30,12 +30,19 @@ extern "C" { #endif -struct OpenVDBReader; +#include <stdlib.h> + struct OpenVDBWriter; struct OpenVDBFloatGrid; struct OpenVDBIntGrid; struct OpenVDBVectorGrid; +typedef struct OpenVDBReader OpenVDBReader; +typedef struct OpenVDBWrite OpenVDBWrite; +typedef struct OpenVDBFloatGrid OpenVDBFloatGrid; +typedef struct OpenVDBIntGrid OpenVDBIntGrid; +typedef struct OpenVDBVectorGrid OpenVDBVectorGrid; + int OpenVDB_getVersionHex(void); enum { @@ -99,6 +106,9 @@ void OpenVDBReader_get_meta_v3(struct OpenVDBReader *reader, const char *name, f void OpenVDBReader_get_meta_v3_int(struct OpenVDBReader *reader, const char *name, int value[3]); void OpenVDBReader_get_meta_mat4(struct OpenVDBReader *reader, const char *name, float value[4][4]); +size_t OpenVDBReader_num_grids(struct OpenVDBReader *reader); +const char *OpenVDBReader_grid_name(struct OpenVDBReader *reader, size_t index); + #ifdef __cplusplus } #endif diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg index a9c0fd431eb..c300e3419a7 100644 --- a/release/datafiles/blender_icons.svg +++ b/release/datafiles/blender_icons.svg @@ -14,7 +14,7 @@ height="640" id="svg2" sodipodi:version="0.32" - inkscape:version="0.91 r13725" + inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" version="1.0" sodipodi:docname="blender_icons.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" @@ -31488,6 +31488,948 @@ offset="1" id="stop3066" /> </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32547" + gradientUnits="userSpaceOnUse" + x1="133.60002" + y1="118" + x2="128.8" + y2="114.8" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32549" + gradientUnits="userSpaceOnUse" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32551" + gradientUnits="userSpaceOnUse" + x1="132.30316" + y1="123.05057" + x2="128.8" + y2="114.8" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32553" + gradientUnits="userSpaceOnUse" + x1="136.35806" + y1="124.27161" + x2="130.48389" + y2="118" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="linearGradient32555" + gradientUnits="userSpaceOnUse" + x1="130.39502" + y1="116.31751" + x2="141.83322" + y2="132.30261" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32682" + gradientUnits="userSpaceOnUse" + x1="133.60002" + y1="118" + x2="128.8" + y2="114.8" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32684" + gradientUnits="userSpaceOnUse" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32582-6" + gradientUnits="userSpaceOnUse" + x1="132.30316" + y1="123.05057" + x2="128.8" + y2="114.8" + gradientTransform="matrix(0.41449742,0,0,0.41449729,13.867831,-70.569949)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32687" + gradientUnits="userSpaceOnUse" + x1="136.35806" + y1="124.27161" + x2="130.48389" + y2="118" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32698" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" + x1="31" + y1="60.000004" + x2="34" + y2="54.000004" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32700" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" + x1="133.60002" + y1="118" + x2="128.8" + y2="114.8" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32702" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32704" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" + x1="136.35806" + y1="124.27161" + x2="130.48389" + y2="118" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient319" + id="linearGradient32706" + gradientUnits="userSpaceOnUse" + x1="28.130203" + y1="65.791054" + x2="32.5" + y2="55.066181" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32798" + gradientUnits="userSpaceOnUse" + x1="133.60002" + y1="118" + x2="128.8" + y2="114.8" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32800" + gradientUnits="userSpaceOnUse" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient35411" + id="linearGradient32803" + gradientUnits="userSpaceOnUse" + x1="136.35806" + y1="124.27161" + x2="130.48389" + y2="118" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient32935" + gradientUnits="userSpaceOnUse" + x1="136.35806" + y1="124.27161" + x2="129.08861" + y2="116.15625" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient24081" + id="linearGradient32576" + gradientUnits="userSpaceOnUse" + x1="31" + y1="60.000004" + x2="34" + y2="54.000004" + gradientTransform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient17438" + id="linearGradient32578" + gradientUnits="userSpaceOnUse" + x1="133.60002" + y1="118" + x2="127.39986" + y2="112.21512" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient32580" + gradientUnits="userSpaceOnUse" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient32582" + gradientUnits="userSpaceOnUse" + x1="132.30316" + y1="123.05057" + x2="126.79002" + y2="113.1464" + gradientTransform="matrix(0.41449742,0,0,0.41449729,13.867831,-70.569949)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient32584" + gradientUnits="userSpaceOnUse" + x1="136.35806" + y1="124.27161" + x2="126.6952" + y2="113.88251" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient24081" + id="linearGradient33975" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" + x1="31" + y1="60.000004" + x2="34" + y2="54.000004" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34027"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34029" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34051" /> + <feColorMatrix + id="feColorMatrix34053" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34075" /> + <feColorMatrix + id="feColorMatrix34077" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient17438" + id="linearGradient33977" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" + x1="133.60002" + y1="118" + x2="127.39986" + y2="112.21512" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34023"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34025" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34047" /> + <feColorMatrix + id="feColorMatrix34049" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34071" /> + <feColorMatrix + id="feColorMatrix34073" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient33979" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34019"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34021" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34043" /> + <feColorMatrix + id="feColorMatrix34045" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34067" /> + <feColorMatrix + id="feColorMatrix34069" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient32582-0" + gradientUnits="userSpaceOnUse" + x1="132.30316" + y1="123.05057" + x2="126.79002" + y2="113.1464" + gradientTransform="matrix(0.41449742,0,0,0.41449729,13.867831,-70.569949)" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34015"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34017" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34039" /> + <feColorMatrix + id="feColorMatrix34041" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34063" /> + <feColorMatrix + id="feColorMatrix34065" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient33981" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" + x1="136.35806" + y1="124.27161" + x2="126.6952" + y2="113.88251" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34011"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34013" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34035" /> + <feColorMatrix + id="feColorMatrix34037" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34059" /> + <feColorMatrix + id="feColorMatrix34061" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="linearGradient33983" + gradientUnits="userSpaceOnUse" + x1="28.130203" + y1="65.791054" + x2="32.5" + y2="55.066181" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34007"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34009" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34031" /> + <feColorMatrix + id="feColorMatrix34033" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34055" /> + <feColorMatrix + id="feColorMatrix34057" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient319" + id="linearGradient34554" + gradientUnits="userSpaceOnUse" + x1="28.130203" + y1="65.791054" + x2="32.5" + y2="55.066181" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34027-5"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34029-3" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34051-5" /> + <feColorMatrix + id="feColorMatrix34053-6" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34075-2" /> + <feColorMatrix + id="feColorMatrix34077-9" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34023-7"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34025-0" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34047-9" /> + <feColorMatrix + id="feColorMatrix34049-3" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34071-6" /> + <feColorMatrix + id="feColorMatrix34073-0" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34019-1"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34021-8" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34043-7" /> + <feColorMatrix + id="feColorMatrix34045-9" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34067-2" /> + <feColorMatrix + id="feColorMatrix34069-0" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34015-2"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34017-3" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34039-7" /> + <feColorMatrix + id="feColorMatrix34041-5" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34063-9" /> + <feColorMatrix + id="feColorMatrix34065-2" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34011-2"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34013-8" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34035-9" /> + <feColorMatrix + id="feColorMatrix34037-7" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34059-3" /> + <feColorMatrix + id="feColorMatrix34061-6" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34007-9"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34009-3" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34031-1" /> + <feColorMatrix + id="feColorMatrix34033-9" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34055-4" /> + <feColorMatrix + id="feColorMatrix34057-7" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient24081" + id="linearGradient18069" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" + x1="31" + y1="60.000004" + x2="34" + y2="54.000004" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient17438" + id="linearGradient18071" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" + x1="133.60002" + y1="118" + x2="127.39986" + y2="112.21512" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient18073" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient18075" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449742,0,0,0.41449729,13.867831,-70.569949)" + x1="132.30316" + y1="123.05057" + x2="126.79002" + y2="113.1464" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient18077" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" + x1="136.35806" + y1="124.27161" + x2="126.6952" + y2="113.88251" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient319" + id="linearGradient18079" + gradientUnits="userSpaceOnUse" + x1="28.130203" + y1="65.791054" + x2="32.5" + y2="55.066181" /> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34027-5-6"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34029-3-1" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34051-5-5" /> + <feColorMatrix + id="feColorMatrix34053-6-5" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34075-2-4" /> + <feColorMatrix + id="feColorMatrix34077-9-7" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34027-5-3"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34029-3-7" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34051-5-4" /> + <feColorMatrix + id="feColorMatrix34053-6-52" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34075-2-5" /> + <feColorMatrix + id="feColorMatrix34077-9-4" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34023-7-4"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34025-0-3" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34047-9-0" /> + <feColorMatrix + id="feColorMatrix34049-3-7" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34071-6-8" /> + <feColorMatrix + id="feColorMatrix34073-0-6" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34019-1-3"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34021-8-1" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34043-7-4" /> + <feColorMatrix + id="feColorMatrix34045-9-9" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34067-2-2" /> + <feColorMatrix + id="feColorMatrix34069-0-0" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34015-2-6"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34017-3-8" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34039-7-9" /> + <feColorMatrix + id="feColorMatrix34041-5-2" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34063-9-6" /> + <feColorMatrix + id="feColorMatrix34065-2-6" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34011-2-4"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34013-8-9" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34035-9-5" /> + <feColorMatrix + id="feColorMatrix34037-7-0" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34059-3-4" /> + <feColorMatrix + id="feColorMatrix34061-6-8" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + inkscape:label="Greyscale" + id="filter34007-9-2"> + <feColorMatrix + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + id="feColorMatrix34009-3-2" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34031-1-6" /> + <feColorMatrix + id="feColorMatrix34033-9-1" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" + result="fbSourceGraphic" /> + <feColorMatrix + result="fbSourceGraphicAlpha" + in="fbSourceGraphic" + values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0" + id="feColorMatrix34055-4-0" /> + <feColorMatrix + id="feColorMatrix34057-7-6" + values="0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0.21 0.72 0.072 0 0 0 0 0 1 0 " + in="fbSourceGraphic" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient24081" + id="linearGradient19154" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" + x1="31" + y1="60.000004" + x2="34" + y2="54.000004" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient17438" + id="linearGradient19156" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449745,0,0,0.41449732,3.272356,-82.276556)" + x1="133.60002" + y1="118" + x2="127.39986" + y2="112.21512" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient19158" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29014874,0,0,0.29014768,23.33396,-63.955726)" + x1="135.46967" + y1="118" + x2="121.4286" + y2="101.14284" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient19160" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.41449742,0,0,0.41449729,13.867831,-70.569949)" + x1="132.30316" + y1="123.05057" + x2="126.79002" + y2="113.1464" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient63892" + id="linearGradient19162" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.37304784,0,0,0.37304731,11.728084,-77.717048)" + x1="136.35806" + y1="124.27161" + x2="126.6952" + y2="113.88251" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient319" + id="linearGradient19164" + gradientUnits="userSpaceOnUse" + x1="28.130203" + y1="65.791054" + x2="32.5" + y2="55.066181" /> </defs> <sodipodi:namedview id="base" @@ -31499,16 +32441,16 @@ objecttolerance="10000" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="19.997864" - inkscape:cx="462.52244" - inkscape:cy="435.14241" + inkscape:zoom="3.3621262" + inkscape:cx="495.96814" + inkscape:cy="182.45712" inkscape:document-units="px" - inkscape:current-layer="g23149-4" + inkscape:current-layer="ICON_MAT_SPHERE_SKY-5-1" showgrid="true" - inkscape:window-width="1920" - inkscape:window-height="1025" - inkscape:window-x="-8" - inkscape:window-y="-8" + inkscape:window-width="3773" + inkscape:window-height="2089" + inkscape:window-x="67" + inkscape:window-y="34" inkscape:snap-nodes="true" inkscape:snap-bbox="true" showguides="true" @@ -31534,8 +32476,8 @@ id="grid17394" visible="true" enabled="true" - spacingx="0.25px" - spacingy="0.25px" + spacingx="0.25" + spacingy="0.25" empspacing="4" color="#808080" opacity="0.09803922" @@ -31543,8 +32485,8 @@ empcolor="#7f7f7f" empopacity="0.25098039" snapvisiblegridlinesonly="true" - originx="0px" - originy="-2.7755576e-17px" /> + originx="0" + originy="-2.7755576e-17" /> </sodipodi:namedview> <metadata id="metadata7"> @@ -53106,7 +54048,7 @@ <path sodipodi:nodetypes="ccccccccccccc" d="m 125.76612,197.75 2.25,2.75 3.5,0 m 0,0 0,3 3,2 2.75,-1.75 m -5.75,-0.62692 -3,2.37692 0,4 m 3,-9 3,0 2,-3" - style="fill:none;stroke:url(#linearGradient42155);stroke-width:1.70000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:url(#linearGradient42155);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path42135" inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png" inkscape:export-xdpi="90" @@ -92866,7 +93808,7 @@ sodipodi:start="6.1086524" sodipodi:end="7.5049158" sodipodi:open="true" - d="m 45.185432,872.62412 c 0.358149,2.03116 -0.793733,4.02628 -2.731847,4.73169" /> + d="m 45.185432,872.62412 a 4.2499995,4.2499995 0 0 1 -2.731847,4.73169" /> <path style="fill:none;stroke:#4b2f1e;stroke-width:2.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="path1376" @@ -92878,9 +93820,9 @@ sodipodi:start="4.4505896" sodipodi:end="4.9741884" sodipodi:open="true" - d="m 39.188267,866.60064 c 1.186888,-0.31802 2.436579,-0.31802 3.623467,0" /> + d="m 39.188267,866.60064 a 7,7 0 0 1 3.623467,0" /> <path - d="m 47.76148,875.17385 c -0.318025,1.18689 -0.942871,2.26916 -1.811733,3.13802" + d="m 47.76148,875.17385 a 6.9999995,6.9999995 0 0 1 -1.811733,3.13802" sodipodi:open="true" sodipodi:end="0.78539816" sodipodi:start="0.26179939" @@ -92892,7 +93834,7 @@ id="path1378" style="fill:none;stroke:#4b2f1e;stroke-width:2.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <path - d="m 39.546414,877.35581 c -1.938113,-0.70541 -3.089995,-2.70053 -2.731846,-4.73169" + d="m 39.546414,877.35581 a 4.2499995,4.2499995 0 0 1 -2.731846,-4.73169" sodipodi:open="true" sodipodi:end="3.3161256" sodipodi:start="1.9198622" @@ -92914,7 +93856,7 @@ sodipodi:start="2.3561945" sodipodi:end="2.8797933" sodipodi:open="true" - d="m 36.050253,878.31187 c -0.868862,-0.86886 -1.493708,-1.95113 -1.811733,-3.13802" /> + d="M 36.050253,878.31187 A 6.9999995,6.9999995 0 0 1 34.23852,875.17385" /> <rect ry="2.75" rx="2.75" @@ -92962,9 +93904,9 @@ sodipodi:start="1.9198622" sodipodi:end="3.3161256" sodipodi:open="true" - d="m 39.546414,877.35581 c -1.938113,-0.70541 -3.089995,-2.70053 -2.731846,-4.73169" /> + d="m 39.546414,877.35581 a 4.2499995,4.2499995 0 0 1 -2.731846,-4.73169" /> <path - d="m 36.050253,878.31187 c -0.868862,-0.86886 -1.493708,-1.95113 -1.811733,-3.13802" + d="M 36.050253,878.31187 A 6.9999995,6.9999995 0 0 1 34.23852,875.17385" sodipodi:open="true" sodipodi:end="2.8797933" sodipodi:start="2.3561945" @@ -92976,7 +93918,7 @@ id="path1394" style="fill:none;stroke:#ffb36b;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <path - d="m 38.875,877.04273 c -0.321653,-0.18571 -0.617575,-0.41278 -0.880204,-0.6754" + d="m 38.875,877.04273 a 4.2499995,4.2499995 0 0 1 -0.880204,-0.6754" sodipodi:open="true" sodipodi:end="2.3561945" sodipodi:start="2.0943951" @@ -92998,7 +93940,7 @@ sodipodi:start="2.3561945" sodipodi:end="2.6179939" sodipodi:open="true" - d="m 36.050253,878.31187 c -0.432565,-0.43257 -0.806561,-0.91997 -1.11243,-1.44975" /> + d="m 36.050253,878.31187 a 6.9999995,6.9999995 0 0 1 -1.11243,-1.44975" /> <path style="fill:none;stroke:#4b2f1e;stroke-width:2.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="path1400" @@ -93010,12 +93952,12 @@ sodipodi:start="0.87266463" sodipodi:end="2.268928" sodipodi:open="true" - d="m -38.268152,-870.10643 c -1.579966,1.32575 -3.88373,1.32575 -5.463696,0" + d="m -38.268152,-870.10643 a 4.2500005,4.2500005 0 0 1 -5.463696,0" inkscape:transform-center-x="-2.2499995" inkscape:transform-center-y="-2.25" transform="scale(-1,-1)" /> <path - d="m -38.268152,-870.10643 c -1.579966,1.32575 -3.88373,1.32575 -5.463696,0" + d="m -38.268152,-870.10643 a 4.2500005,4.2500005 0 0 1 -5.463696,0" sodipodi:open="true" sodipodi:end="2.268928" sodipodi:start="0.87266463" @@ -93040,7 +93982,7 @@ sodipodi:start="1.3089969" sodipodi:end="1.8325957" sodipodi:open="true" - d="m -39.188266,-866.60064 c -1.186888,0.31803 -2.436579,0.31803 -3.623467,0" + d="m -39.188266,-866.60064 a 7.0000005,7.0000005 0 0 1 -3.623467,0" inkscape:transform-center-y="-3.7500001" transform="scale(-1,-1)" inkscape:transform-center-x="-3.7499995" /> @@ -93055,9 +93997,9 @@ sodipodi:start="4.0142573" sodipodi:end="4.9741884" sodipodi:open="true" - d="m 38.268153,870.10643 c 1.062216,-0.8913 2.492452,-1.20838 3.831828,-0.84949" /> + d="m 38.268153,870.10643 a 4.25,4.25 0 0 1 3.831828,-0.84949" /> <path - d="m 39.188267,866.60064 c 1.186888,-0.31802 2.436579,-0.31802 3.623467,0" + d="m 39.188267,866.60064 a 7,7 0 0 1 3.623467,0" sodipodi:open="true" sodipodi:end="4.9741884" sodipodi:start="4.4505896" @@ -93079,9 +94021,9 @@ sodipodi:start="4.4505896" sodipodi:end="4.712389" sodipodi:open="true" - d="M 39.188267,866.60064 C 39.779161,866.44231 40.388261,866.36212 41,866.36212" /> + d="M 39.188267,866.60064 A 6.9999995,6.9999995 0 0 1 41,866.36212" /> <path - d="m 38.268153,870.10643 c 0.475408,-0.39891 1.032412,-0.68887 1.631866,-0.84949" + d="m 38.268153,870.10643 a 4.25,4.25 0 0 1 1.631866,-0.84949" sodipodi:open="true" sodipodi:end="4.4505896" sodipodi:start="4.0142573" @@ -93103,9 +94045,9 @@ sodipodi:ry="7" sodipodi:start="0.26179939" sodipodi:end="0.78539816" - d="m 47.761481,875.17385 c -0.318026,1.18689 -0.942871,2.26916 -1.811734,3.13802" /> + d="m 47.761481,875.17385 a 7,7 0 0 1 -1.811734,3.13802" /> <path - d="m 45.185432,872.62412 c 0.358149,2.03116 -0.793733,4.02628 -2.731847,4.73169" + d="m 45.185432,872.62412 a 4.2499995,4.2499995 0 0 1 -2.731847,4.73169" sodipodi:end="7.5049158" sodipodi:start="6.1086524" sodipodi:ry="4.2499995" @@ -93217,8 +94159,7 @@ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" id="circle63689" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#422200;stroke-width:1.97436094;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" - transform="matrix(0.6425292,0,0,0.642531,44.523834,146.81699)" - d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" /> + transform="matrix(0.6425292,0,0,0.642531,44.523834,146.81699)" /> <circle sodipodi:ry="8" sodipodi:rx="8" @@ -93232,8 +94173,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.5858806,-0.06590218,0.06677852,-0.5812167,198.80048,299.96262)" - d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" /> + transform="matrix(-0.5858806,-0.06590218,0.06677852,-0.5812167,198.80048,299.96262)" /> <circle sodipodi:ry="8" sodipodi:rx="8" @@ -93247,8 +94187,7 @@ id="circle63693" 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" - d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" /> + inkscape:export-ydpi="90" /> </g> </g> </g> @@ -93260,6 +94199,406 @@ inkscape:connector-curvature="0" /> </g> </g> + <g + transform="translate(70.399853,363.77466)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5-9" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <g + style="opacity:0.6" + transform="matrix(-1,0,0,1,194,-21)" + id="g35439-7-0"> + <path + style="display:inline;fill:url(#linearGradient32698);fill-opacity:1;fill-rule:nonzero;stroke:#0b1728;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" + d="m 33.365873,54.006842 c -2.196505,0 -3.979175,1.782668 -3.979175,3.979175 0,0.02858 -6.01e-4,0.05446 0,0.0829 -1.510584,0.309602 -2.652783,1.63026 -2.652784,3.23308 0,1.831794 1.48556,3.315981 3.31598,3.31598 l 8.621546,0 c 2.196505,0 3.979176,-1.782672 3.979176,-3.979176 0,-2.196506 -1.782671,-3.979174 -3.979176,-3.979175 -0.535398,0 -1.025791,0.13959 -1.49219,0.331598 -0.450618,-1.703102 -1.969228,-2.984381 -3.813377,-2.984382 z" + id="path34600-9-9" + inkscape:connector-curvature="0" /> + <ellipse + cy="-33.365871" + cx="57.986019" + 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="path35419-2-4" + style="display:inline;fill:url(#linearGradient32700);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + transform="matrix(0,1,-1,0,0,0)" + rx="3.3159795" + ry="3.3159785" /> + <ellipse + cy="-29.7183" + cx="61.633595" + transform="matrix(0,1,-1,0,0,0)" + style="display:inline;fill:url(#linearGradient32702);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + id="path34624-7-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" + rx="2.3211899" + ry="2.3211815" /> + <ellipse + cy="-21.659269" + cx="68.58149" + transform="matrix(0.25881906,0.96592582,-0.96592582,0.25881908,0,0)" + style="display:inline;fill:url(#linearGradient32582-6);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + id="path35435-6-4" + 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" + rx="3.3159795" + ry="3.3159783" /> + <ellipse + cy="-33.697464" + cx="60.970398" + 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="path35429-9-7" + style="display:inline;fill:url(#linearGradient32704);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + transform="matrix(0,1,-1,0,0,0)" + rx="2.9843826" + ry="2.9843783" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-0.92788464" + inkscape:original="M 31.5 52.5 C 29.844 52.5 28.5 53.843998 28.5 55.5 C 28.5 55.521551 28.499547 55.541057 28.5 55.5625 C 27.361133 55.795917 26.500001 56.791594 26.5 58 C 26.5 59.381035 27.620001 60.500001 29 60.5 L 35.5 60.5 C 37.156 60.5 38.5 59.155999 38.5 57.5 C 38.5 55.843999 37.156 54.500001 35.5 54.5 C 35.09635 54.5 34.72663 54.605241 34.375 54.75 C 34.035268 53.465989 32.89035 52.500001 31.5 52.5 z " + style="display:inline;fill:none;stroke:url(#linearGradient32706);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" + id="path35703-1-3" + d="m 31.5,53.427734 c -1.153957,0 -2.072266,0.918307 -2.072266,2.072266 0,0.03455 7.4e-5,0.04646 0,0.04297 a 0.92797743,0.92797743 0 0 1 -0.742187,0.927734 C 27.964996,56.618384 27.427735,57.232412 27.427734,58 c 0,0.879367 0.693848,1.572266 1.572266,1.572266 l 6.5,0 c 1.153956,0 2.072266,-0.918311 2.072266,-2.072266 0,-1.153957 -0.918309,-2.072265 -2.072266,-2.072266 -0.242369,0 -0.485183,0.06182 -0.771484,0.179688 a 0.92797743,0.92797743 0 0 1 -1.25,-0.619141 C 33.241204,54.091366 32.460566,53.427735 31.5,53.427734 Z" + transform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + </g> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6-5" + 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> + <g + transform="translate(126.81451,377.85541)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5-1" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6-4" + 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 + transform="matrix(0.95352643,0,0,0.95352643,7.2135761,23.248546)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <g + style="opacity:1" + transform="matrix(-1,0,0,1,194,-21)" + id="g35439-7"> + <path + style="display:inline;fill:url(#linearGradient32576);fill-opacity:1;fill-rule:nonzero;stroke:#422200;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" + d="m 33.365873,54.006842 c -2.196505,0 -3.979175,1.782668 -3.979175,3.979175 0,0.02858 -6.01e-4,0.05446 0,0.0829 -1.510584,0.309602 -2.652783,1.63026 -2.652784,3.23308 0,1.831794 1.48556,3.315981 3.31598,3.31598 h 8.621546 c 2.196505,0 3.979176,-1.782672 3.979176,-3.979176 0,-2.196506 -1.782671,-3.979174 -3.979176,-3.979175 -0.535398,0 -1.025791,0.13959 -1.49219,0.331598 -0.450618,-1.703102 -1.969228,-2.984381 -3.813377,-2.984382 z" + id="path34600-9" + inkscape:connector-curvature="0" /> + <ellipse + cy="-33.365871" + cx="57.986019" + 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="path35419-2" + style="display:inline;fill:url(#linearGradient32578);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + transform="rotate(90)" + rx="3.3159795" + ry="3.3159785" /> + <ellipse + cy="-29.7183" + cx="61.633595" + transform="rotate(90)" + style="display:inline;fill:url(#linearGradient32580);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + id="path34624-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" + rx="2.3211899" + ry="2.3211815" /> + <ellipse + cy="-21.659269" + cx="68.58149" + transform="rotate(74.999999)" + style="display:inline;fill:url(#linearGradient32582);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + id="path35435-6" + 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" + rx="3.3159795" + ry="3.3159783" /> + <ellipse + cy="-33.697464" + cx="60.970398" + 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="path35429-9" + style="display:inline;fill:url(#linearGradient32584);fill-opacity:1;fill-rule:nonzero;stroke:none;enable-background:new" + transform="rotate(90)" + rx="2.9843826" + ry="2.9843783" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-0.92788464" + inkscape:original="M 31.5 52.5 C 29.844 52.5 28.5 53.843998 28.5 55.5 C 28.5 55.521551 28.499547 55.541057 28.5 55.5625 C 27.361133 55.795917 26.500001 56.791594 26.5 58 C 26.5 59.381035 27.620001 60.500001 29 60.5 L 35.5 60.5 C 37.156 60.5 38.5 59.155999 38.5 57.5 C 38.5 55.843999 37.156 54.500001 35.5 54.5 C 35.09635 54.5 34.72663 54.605241 34.375 54.75 C 34.035268 53.465989 32.89035 52.500001 31.5 52.5 z " + style="display:inline;fill:none;stroke:url(#linearGradient34554);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" + id="path35703-1" + d="m 31.5,53.427734 c -1.153957,0 -2.072266,0.918307 -2.072266,2.072266 0,0.03455 7.4e-5,0.04646 0,0.04297 a 0.92797743,0.92797743 0 0 1 -0.742187,0.927734 C 27.964996,56.618384 27.427735,57.232412 27.427734,58 c 0,0.879367 0.693848,1.572266 1.572266,1.572266 h 6.5 c 1.153956,0 2.072266,-0.918311 2.072266,-2.072266 0,-1.153957 -0.918309,-2.072265 -2.072266,-2.072266 -0.242369,0 -0.485183,0.06182 -0.771484,0.179688 a 0.92797743,0.92797743 0 0 1 -1.25,-0.619141 C 33.241204,54.091366 32.460566,53.427735 31.5,53.427734 Z" + transform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + </g> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6" + 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> + <g + transform="matrix(0.9465554,0,0,0.9465554,8.381744,2.5965952)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5-0" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <g + style="opacity:1" + transform="matrix(-1,0,0,1,194,-21)" + id="g35439-7-1"> + <path + style="display:inline;fill:url(#linearGradient33975);fill-opacity:1;fill-rule:nonzero;stroke:#191919;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.8;filter:url(#filter34027);enable-background:new" + d="m 33.365873,54.006842 c -2.196505,0 -3.979175,1.782668 -3.979175,3.979175 0,0.02858 -6.01e-4,0.05446 0,0.0829 -1.510584,0.309602 -2.652783,1.63026 -2.652784,3.23308 0,1.831794 1.48556,3.315981 3.31598,3.31598 h 8.621546 c 2.196505,0 3.979176,-1.782672 3.979176,-3.979176 0,-2.196506 -1.782671,-3.979174 -3.979176,-3.979175 -0.535398,0 -1.025791,0.13959 -1.49219,0.331598 -0.450618,-1.703102 -1.969228,-2.984381 -3.813377,-2.984382 z" + id="path34600-9-7" + inkscape:connector-curvature="0" /> + <ellipse + cy="-33.365871" + cx="57.986019" + 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="path35419-2-1" + style="display:inline;fill:url(#linearGradient33977);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34023);enable-background:new" + transform="rotate(90)" + rx="3.3159795" + ry="3.3159785" /> + <ellipse + cy="-29.7183" + cx="61.633595" + transform="rotate(90)" + style="display:inline;fill:url(#linearGradient33979);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34019);enable-background:new" + id="path34624-7-3" + 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" + rx="2.3211899" + ry="2.3211815" /> + <ellipse + cy="-21.659269" + cx="68.58149" + transform="rotate(74.999999)" + style="display:inline;fill:url(#linearGradient32582-0);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34015);enable-background:new" + id="path35435-6-6" + 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" + rx="3.3159795" + ry="3.3159783" /> + <ellipse + cy="-33.697464" + cx="60.970398" + 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="path35429-9-5" + style="display:inline;fill:url(#linearGradient33981);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34011);enable-background:new" + transform="rotate(90)" + rx="2.9843826" + ry="2.9843783" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-0.92788464" + inkscape:original="M 31.5 52.5 C 29.844 52.5 28.5 53.843998 28.5 55.5 C 28.5 55.521551 28.499547 55.541057 28.5 55.5625 C 27.361133 55.795917 26.500001 56.791594 26.5 58 C 26.5 59.381035 27.620001 60.500001 29 60.5 L 35.5 60.5 C 37.156 60.5 38.5 59.155999 38.5 57.5 C 38.5 55.843999 37.156 54.500001 35.5 54.5 C 35.09635 54.5 34.72663 54.605241 34.375 54.75 C 34.035268 53.465989 32.89035 52.500001 31.5 52.5 z " + style="display:inline;fill:none;stroke:url(#linearGradient33983);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter34007);enable-background:new" + id="path35703-1-6" + d="m 31.5,53.427734 c -1.153957,0 -2.072266,0.918307 -2.072266,2.072266 0,0.03455 7.4e-5,0.04646 0,0.04297 a 0.92797743,0.92797743 0 0 1 -0.742187,0.927734 C 27.964996,56.618384 27.427735,57.232412 27.427734,58 c 0,0.879367 0.693848,1.572266 1.572266,1.572266 h 6.5 c 1.153956,0 2.072266,-0.918311 2.072266,-2.072266 0,-1.153957 -0.918309,-2.072265 -2.072266,-2.072266 -0.242369,0 -0.485183,0.06182 -0.771484,0.179688 a 0.92797743,0.92797743 0 0 1 -1.25,-0.619141 C 33.241204,54.091366 32.460566,53.427735 31.5,53.427734 Z" + transform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + </g> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6-3" + 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> + <g + transform="matrix(0.94355056,0,0,0.94355056,260.85544,86.704368)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5-0-8" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <g + style="opacity:1" + transform="matrix(-1,0,0,1,194,-21)" + id="g35439-7-1-4"> + <path + style="display:inline;fill:url(#linearGradient18069);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter34027-5);enable-background:new" + d="m 33.365873,54.006842 c -2.196505,0 -3.979175,1.782668 -3.979175,3.979175 0,0.02858 -6.01e-4,0.05446 0,0.0829 -1.510584,0.309602 -2.652783,1.63026 -2.652784,3.23308 0,1.831794 1.48556,3.315981 3.31598,3.31598 h 8.621546 c 2.196505,0 3.979176,-1.782672 3.979176,-3.979176 0,-2.196506 -1.782671,-3.979174 -3.979176,-3.979175 -0.535398,0 -1.025791,0.13959 -1.49219,0.331598 -0.450618,-1.703102 -1.969228,-2.984381 -3.813377,-2.984382 z" + id="path34600-9-7-5" + inkscape:connector-curvature="0" /> + <ellipse + cy="-33.365871" + cx="57.986019" + 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="path35419-2-1-0" + style="display:inline;fill:url(#linearGradient18071);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34023-7);enable-background:new" + transform="rotate(90)" + rx="3.3159795" + ry="3.3159785" /> + <ellipse + cy="-29.7183" + cx="61.633595" + transform="rotate(90)" + style="display:inline;fill:url(#linearGradient18073);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34019-1);enable-background:new" + id="path34624-7-3-3" + 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" + rx="2.3211899" + ry="2.3211815" /> + <ellipse + cy="-21.659269" + cx="68.58149" + transform="rotate(74.999999)" + style="display:inline;fill:url(#linearGradient18075);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34015-2);enable-background:new" + id="path35435-6-6-6" + 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" + rx="3.3159795" + ry="3.3159783" /> + <ellipse + cy="-33.697464" + cx="60.970398" + 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="path35429-9-5-1" + style="display:inline;fill:url(#linearGradient18077);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34011-2);enable-background:new" + transform="rotate(90)" + rx="2.9843826" + ry="2.9843783" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-0.92788464" + inkscape:original="M 31.5 52.5 C 29.844 52.5 28.5 53.843998 28.5 55.5 C 28.5 55.521551 28.499547 55.541057 28.5 55.5625 C 27.361133 55.795917 26.500001 56.791594 26.5 58 C 26.5 59.381035 27.620001 60.500001 29 60.5 L 35.5 60.5 C 37.156 60.5 38.5 59.155999 38.5 57.5 C 38.5 55.843999 37.156 54.500001 35.5 54.5 C 35.09635 54.5 34.72663 54.605241 34.375 54.75 C 34.035268 53.465989 32.89035 52.500001 31.5 52.5 z " + style="display:inline;fill:none;stroke:url(#linearGradient18079);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter34007-9);enable-background:new" + id="path35703-1-6-0" + d="m 31.5,53.427734 c -1.153957,0 -2.072266,0.918307 -2.072266,2.072266 0,0.03455 7.4e-5,0.04646 0,0.04297 a 0.92797743,0.92797743 0 0 1 -0.742187,0.927734 C 27.964996,56.618384 27.427735,57.232412 27.427734,58 c 0,0.879367 0.693848,1.572266 1.572266,1.572266 h 6.5 c 1.153956,0 2.072266,-0.918311 2.072266,-2.072266 0,-1.153957 -0.918309,-2.072265 -2.072266,-2.072266 -0.242369,0 -0.485183,0.06182 -0.771484,0.179688 a 0.92797743,0.92797743 0 0 1 -1.25,-0.619141 C 33.241204,54.091366 32.460566,53.427735 31.5,53.427734 Z" + transform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + </g> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6-3-6" + 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> + <g + transform="matrix(0.94549709,0,0,0.94549709,29.583472,149.50983)" + style="display:inline;enable-background:new" + id="ICON_MAT_SPHERE_SKY-5-0-8-1" + inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 3\sphere with sky.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <g + style="opacity:1" + transform="matrix(-1,0,0,1,194,-21)" + id="g35439-7-1-4-5"> + <path + style="display:inline;fill:url(#linearGradient19154);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter34027-5-3);enable-background:new" + d="m 33.365873,54.006842 c -2.196505,0 -3.979175,1.782668 -3.979175,3.979175 0,0.02858 -6.01e-4,0.05446 0,0.0829 -1.510584,0.309602 -2.652783,1.63026 -2.652784,3.23308 0,1.831794 1.48556,3.315981 3.31598,3.31598 h 8.621546 c 2.196505,0 3.979176,-1.782672 3.979176,-3.979176 0,-2.196506 -1.782671,-3.979174 -3.979176,-3.979175 -0.535398,0 -1.025791,0.13959 -1.49219,0.331598 -0.450618,-1.703102 -1.969228,-2.984381 -3.813377,-2.984382 z" + id="path34600-9-7-5-9" + inkscape:connector-curvature="0" /> + <ellipse + cy="-33.365871" + cx="57.986019" + 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="path35419-2-1-0-4" + style="display:inline;fill:url(#linearGradient19156);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34023-7-4);enable-background:new" + transform="rotate(90)" + rx="3.3159795" + ry="3.3159785" /> + <ellipse + cy="-29.7183" + cx="61.633595" + transform="rotate(90)" + style="display:inline;fill:url(#linearGradient19158);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34019-1-3);enable-background:new" + id="path34624-7-3-3-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" + rx="2.3211899" + ry="2.3211815" /> + <ellipse + cy="-21.659269" + cx="68.58149" + transform="rotate(74.999999)" + style="display:inline;fill:url(#linearGradient19160);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34015-2-6);enable-background:new" + id="path35435-6-6-6-0" + 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" + rx="3.3159795" + ry="3.3159783" /> + <ellipse + cy="-33.697464" + cx="60.970398" + 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="path35429-9-5-1-9" + style="display:inline;fill:url(#linearGradient19162);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter34011-2-4);enable-background:new" + transform="rotate(90)" + rx="2.9843826" + ry="2.9843783" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-0.92788464" + inkscape:original="M 31.5 52.5 C 29.844 52.5 28.5 53.843998 28.5 55.5 C 28.5 55.521551 28.499547 55.541057 28.5 55.5625 C 27.361133 55.795917 26.500001 56.791594 26.5 58 C 26.5 59.381035 27.620001 60.500001 29 60.5 L 35.5 60.5 C 37.156 60.5 38.5 59.155999 38.5 57.5 C 38.5 55.843999 37.156 54.500001 35.5 54.5 C 35.09635 54.5 34.72663 54.605241 34.375 54.75 C 34.035268 53.465989 32.89035 52.500001 31.5 52.5 z " + style="display:inline;fill:none;stroke:url(#linearGradient19164);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter34007-9-2);enable-background:new" + id="path35703-1-6-0-1" + d="m 31.5,53.427734 c -1.153957,0 -2.072266,0.918307 -2.072266,2.072266 0,0.03455 7.4e-5,0.04646 0,0.04297 a 0.92797743,0.92797743 0 0 1 -0.742187,0.927734 C 27.964996,56.618384 27.427735,57.232412 27.427734,58 c 0,0.879367 0.693848,1.572266 1.572266,1.572266 h 6.5 c 1.153956,0 2.072266,-0.918311 2.072266,-2.072266 0,-1.153957 -0.918309,-2.072265 -2.072266,-2.072266 -0.242369,0 -0.485183,0.06182 -0.771484,0.179688 a 0.92797743,0.92797743 0 0 1 -1.25,-0.619141 C 33.241204,54.091366 32.460566,53.427735 31.5,53.427734 Z" + transform="matrix(1.3263918,0,0,1.3263918,-8.4154695,-15.628729)" /> + </g> + <rect + y="31" + x="152" + height="16" + width="16" + id="rect34608-6-3-6-7" + 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> + </g> </g> <g inkscape:groupmode="layer" diff --git a/release/datafiles/blender_icons16/icon16_outliner_data_volume.dat b/release/datafiles/blender_icons16/icon16_outliner_data_volume.dat Binary files differnew file mode 100644 index 00000000000..cfd7db722b8 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_outliner_data_volume.dat diff --git a/release/datafiles/blender_icons16/icon16_outliner_ob_volume.dat b/release/datafiles/blender_icons16/icon16_outliner_ob_volume.dat Binary files differnew file mode 100644 index 00000000000..a86ce7b9eaf --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_outliner_ob_volume.dat diff --git a/release/datafiles/blender_icons16/icon16_snap_volume.dat b/release/datafiles/blender_icons16/icon16_snap_volume.dat Binary files differindex d7a5de02c93..ec9ff2d6c37 100644 --- a/release/datafiles/blender_icons16/icon16_snap_volume.dat +++ b/release/datafiles/blender_icons16/icon16_snap_volume.dat diff --git a/release/datafiles/blender_icons16/icon16_volume.dat b/release/datafiles/blender_icons16/icon16_volume.dat Binary files differnew file mode 100644 index 00000000000..a698654c869 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_volume.dat diff --git a/release/datafiles/blender_icons16/icon16_volume_data.dat b/release/datafiles/blender_icons16/icon16_volume_data.dat Binary files differnew file mode 100644 index 00000000000..77adf7f75e4 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_volume_data.dat diff --git a/release/datafiles/blender_icons32/icon32_outliner_data_volume.dat b/release/datafiles/blender_icons32/icon32_outliner_data_volume.dat Binary files differnew file mode 100644 index 00000000000..dd0162d11c0 --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_outliner_data_volume.dat diff --git a/release/datafiles/blender_icons32/icon32_outliner_ob_volume.dat b/release/datafiles/blender_icons32/icon32_outliner_ob_volume.dat Binary files differnew file mode 100644 index 00000000000..da109c66b1f --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_outliner_ob_volume.dat diff --git a/release/datafiles/blender_icons32/icon32_snap_volume.dat b/release/datafiles/blender_icons32/icon32_snap_volume.dat Binary files differindex 692d776702d..872d82b61ab 100644 --- a/release/datafiles/blender_icons32/icon32_snap_volume.dat +++ b/release/datafiles/blender_icons32/icon32_snap_volume.dat diff --git a/release/datafiles/blender_icons32/icon32_volume.dat b/release/datafiles/blender_icons32/icon32_volume.dat Binary files differnew file mode 100644 index 00000000000..0a3de336df2 --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_volume.dat diff --git a/release/datafiles/blender_icons32/icon32_volume_data.dat b/release/datafiles/blender_icons32/icon32_volume_data.dat Binary files differnew file mode 100644 index 00000000000..76099f4815a --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_volume_data.dat diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index f98074cdf0b..99eb8103ebc 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -40,6 +40,7 @@ _modules = [ "properties_data_metaball", "properties_data_modifier", "properties_data_speaker", + "properties_data_volume", "properties_game", "properties_mask_common", "properties_material", diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py new file mode 100644 index 00000000000..f2edeabb6a7 --- /dev/null +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -0,0 +1,101 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> +import bpy +from bpy.types import Panel, UIList +from rna_prop_ui import PropertyPanel + + +class DataButtonsPanel: + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "data" + + @classmethod + def poll(cls, context): + engine = context.scene.render.engine + return context.volume and (engine in cls.COMPAT_ENGINES) + + +class DATA_PT_context_volume(DataButtonsPanel, Panel): + bl_label = "" + bl_options = {'HIDE_HEADER'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + ob = context.object + volume = context.volume + space = context.space_data + + split = layout.split(percentage=0.65) + + if ob: + split.template_ID(ob, "data") + elif volume: + split.template_ID(space, "pin_id") + + +class DATA_PT_volume(DataButtonsPanel, Panel): + bl_label = "Volume" + COMPAT_ENGINES = {'BLENDER_RENDER'} + + def draw(self, context): + layout = self.layout + + volume = context.volume + + layout.prop(volume, "filepath", text="") + + +class VOLUME_UL_grids(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + layout.prop(item, "name", text="", emboss=False, icon='OUTLINER_DATA_LATTICE') + + +class DATA_PT_volume_grids(DataButtonsPanel, Panel): + bl_label = "Grids" + COMPAT_ENGINES = {'BLENDER_RENDER'} + + def draw(self, context): + layout = self.layout + + volume = context.volume + + layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=2) + +class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel): + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + _context_path = "object.data" + _property_type = bpy.types.Volume + + +classes = ( + DATA_PT_context_volume, + DATA_PT_volume, + DATA_PT_volume_grids, + DATA_PT_custom_props_volume, + VOLUME_UL_grids, +) + +if __name__ == "__main__": # only for live edit. + from bpy.utils import register_class + for cls in classes: + register_class(cls) diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 731032bafa8..a8a69581af7 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -88,6 +88,8 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False): row.prop(dopesheet, "show_curves", text="") if bpy.data.metaballs: row.prop(dopesheet, "show_metaballs", text="") + if bpy.data.volumes: + row.prop(dopesheet, "show_volumes", text="") if bpy.data.lattices: row.prop(dopesheet, "show_lattices", text="") if bpy.data.armatures: diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 0a365c6a20c..295f68a34b1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1309,6 +1309,7 @@ class INFO_MT_add(Menu): layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE') layout.menu("INFO_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') + layout.operator("object.volume_add", text="Volume", icon='OUTLINER_OB_VOLUME') layout.separator() layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 41f1a64ca51..54f228f0f73 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -190,6 +190,7 @@ class VIEW3D_PT_tools_add_object(View3DPanel, Panel): @staticmethod def draw_add_other(layout): layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') + layout.operator("object.volume_add", text="Volume", icon='OUTLINER_OB_VOLUME') layout.operator("object.armature_add", text="Armature", icon='OUTLINER_OB_ARMATURE') layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE' layout.operator("object.empty_add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'PLAIN_AXES' diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index c2b971a91cd..2fe6944a524 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -157,7 +157,7 @@ void id_clear_lib_data_ex(struct Main *bmain, struct ID *id, const bool id_in_ma struct ListBase *which_libbase(struct Main *mainlib, short type); -#define MAX_LIBARRAY 35 +#define MAX_LIBARRAY 36 int set_listbasepointers(struct Main *main, struct ListBase *lb[MAX_LIBARRAY]); /* Main API */ diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index e224155726f..e2f806e7368 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -125,6 +125,7 @@ typedef struct Main { ListBase mask; ListBase linestyle; ListBase cachefiles; + ListBase volume; char id_tag_update[MAX_LIBARRAY]; diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index 1056c5d2119..0dc55296b03 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -42,6 +42,7 @@ struct Main; struct PackedFile; struct ReportList; struct VFont; +struct Volume; /* pack */ struct PackedFile *dupPackedFile(const struct PackedFile *pf_src); @@ -58,6 +59,7 @@ char *unpackFile( int unpackVFont(struct Main *bmain, struct ReportList *reports, struct VFont *vfont, int how); int unpackSound(struct Main *bmain, struct ReportList *reports, struct bSound *sound, int how); int unpackImage(struct Main *bmain, struct ReportList *reports, struct Image *ima, int how); +int unpackVolume(struct Main *bmain, struct ReportList *reports, struct Volume *volume, int how); void unpackAll(struct Main *bmain, struct ReportList *reports, int how); int unpackLibraries(struct Main *bmain, struct ReportList *reports); diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h new file mode 100644 index 00000000000..60a20e3c911 --- /dev/null +++ b/source/blender/blenkernel/BKE_volume.h @@ -0,0 +1,43 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Brecht Van Lommel. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __BKE_VOLUME_H__ +#define __BKE_VOLUME_H__ + +/** \file BKE_volume.h + * \ingroup bke + * \brief General operations for volumes. + */ + +struct Main; +struct Volume; + +void BKE_volume_init(struct Volume *volume); +void *BKE_volume_add(struct Main *bmain, const char *name); +void BKE_volume_copy_data(struct Main *bmain, struct Volume *volume_dst, const struct Volume *volume_src, const int flag); +struct Volume *BKE_volume_copy(struct Main *bmain, const struct Volume *volume); +void BKE_volume_make_local(struct Main *bmain, struct Volume *volume, const bool lib_local); +void BKE_volume_free(struct Volume *volume); + +void BKE_volume_reload(struct Main *bmain, struct Volume *volume); + +#endif diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 45f2ac083dd..34ec98e94e1 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -192,6 +192,7 @@ set(SRC intern/tracking_util.c intern/undo_system.c intern/unit.c + intern/volume.c intern/world.c intern/writeavi.c intern/writeframeserver.c @@ -301,6 +302,7 @@ set(SRC BKE_tracking.h BKE_undo_system.h BKE_unit.h + BKE_volume.h BKE_world.h BKE_writeavi.h BKE_writeframeserver.h diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 05cb10ab7a4..6128bd840d8 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -103,6 +103,7 @@ bool id_type_can_have_animdata(const short id_type) case ID_MSK: case ID_GD: case ID_CF: + case ID_VO: return true; /* no AnimData */ @@ -1175,6 +1176,9 @@ void BKE_animdata_main_cb(Main *bmain, ID_AnimData_Edit_Callback func, void *use /* cache files */ ANIMDATA_IDS_CB(bmain->cachefiles.first); + + /* volumes */ + ANIMDATA_IDS_CB(bmain->volume.first); } /* Fix all RNA-Paths throughout the database (directly access the Global.main version) @@ -1269,6 +1273,9 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha /* cache files */ RENAMEFIX_ANIM_IDS(bmain->cachefiles.first); + /* volumes */ + RENAMEFIX_ANIM_IDS(bmain->volume.first); + /* scenes */ RENAMEFIX_ANIM_NODETREE_IDS(bmain->scene.first, Scene); } @@ -2901,6 +2908,9 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) /* cache files */ EVAL_ANIM_IDS(main->cachefiles.first, ADT_RECALC_ANIM); + /* volumes */ + EVAL_ANIM_IDS(main->volume.first, ADT_RECALC_ANIM); + /* objects */ /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets * this tagged by Depsgraph on framechange. This optimization means that objects diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 0b191e1f69b..8d3caa1897f 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -67,6 +67,7 @@ #include "DNA_scene_types.h" #include "DNA_smoke_types.h" #include "DNA_freestyle_types.h" +#include "DNA_volume_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" @@ -532,6 +533,14 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int } break; } + case ID_VO: + { + Volume *volume = (Volume *)id; + if (volume->packedfile == NULL || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) { + rewrite_path_fixed(volume->filepath, visit_cb, absbase, bpath_user_data); + } + break; + } case ID_TXT: if (((Text *)id)->name) { rewrite_path_alloc(&((Text *)id)->name, visit_cb, absbase, bpath_user_data); diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index d995dce1259..e9fc941c0e9 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -89,6 +89,7 @@ static IDType idtypes[] = { { ID_TE, "Texture", "textures", BLT_I18NCONTEXT_ID_TEXTURE, IDTYPE_FLAGS_ISLINKABLE }, { ID_TXT, "Text", "texts", BLT_I18NCONTEXT_ID_TEXT, IDTYPE_FLAGS_ISLINKABLE }, { ID_VF, "VFont", "fonts", BLT_I18NCONTEXT_ID_VFONT, IDTYPE_FLAGS_ISLINKABLE }, + { ID_VO, "Volume", "volumes", BLT_I18NCONTEXT_ID_VOLUME, IDTYPE_FLAGS_ISLINKABLE }, { ID_WO, "World", "worlds", BLT_I18NCONTEXT_ID_WORLD, IDTYPE_FLAGS_ISLINKABLE }, { ID_WM, "WindowManager", "window_managers", BLT_I18NCONTEXT_ID_WINDOWMANAGER, 0 }, @@ -209,6 +210,7 @@ int BKE_idcode_to_idfilter(const short idcode) CASE_IDFILTER(TE); CASE_IDFILTER(TXT); CASE_IDFILTER(VF); + CASE_IDFILTER(VO); CASE_IDFILTER(WO); default: return 0; @@ -253,6 +255,7 @@ short BKE_idcode_from_idfilter(const int idfilter) CASE_IDFILTER(TE); CASE_IDFILTER(TXT); CASE_IDFILTER(VF); + CASE_IDFILTER(VO); CASE_IDFILTER(WO); default: return 0; @@ -301,6 +304,7 @@ int BKE_idcode_to_index(const short idcode) CASE_IDINDEX(TE); CASE_IDINDEX(TXT); CASE_IDINDEX(VF); + CASE_IDINDEX(VO); CASE_IDINDEX(WM); CASE_IDINDEX(WO); } diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 0eb943cc15b..703121d6798 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -68,6 +68,7 @@ #include "DNA_sound_types.h" #include "DNA_text_types.h" #include "DNA_vfont_types.h" +#include "DNA_volume_types.h" #include "DNA_windowmanager_types.h" #include "DNA_world_types.h" @@ -122,6 +123,7 @@ #include "BKE_scene.h" #include "BKE_text.h" #include "BKE_texture.h" +#include "BKE_volume.h" #include "BKE_world.h" #include "DEG_depsgraph.h" @@ -469,6 +471,9 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local) case ID_CF: if (!test) BKE_cachefile_make_local(bmain, (CacheFile *)id, lib_local); return true; + case ID_VO: + if (!test) BKE_volume_make_local(bmain, (Volume *)id, lib_local); + return true; case ID_SCR: case ID_LI: case ID_KE: @@ -646,6 +651,9 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con case ID_VF: BKE_vfont_copy_data(bmain, (VFont *)*r_newid, (VFont *)id, flag); break; + case ID_VO: + BKE_volume_copy_data(bmain, (Volume *)*r_newid, (Volume *)id, flag); + break; case ID_LI: case ID_SCR: case ID_WM: @@ -878,6 +886,8 @@ ListBase *which_libbase(Main *mainlib, short type) return &(mainlib->paintcurves); case ID_CF: return &(mainlib->cachefiles); + case ID_VO: + return &(mainlib->volume); } return NULL; } @@ -1016,6 +1026,7 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[INDEX_ID_BR] = &(main->brush); lb[INDEX_ID_PA] = &(main->particle); lb[INDEX_ID_SPK] = &(main->speaker); + lb[INDEX_ID_VO] = &(main->volume); lb[INDEX_ID_WO] = &(main->world); lb[INDEX_ID_MC] = &(main->movieclip); @@ -1090,6 +1101,7 @@ size_t BKE_libblock_get_alloc_info(short type, const char **name) CASE_RETURN(ID_PAL, Palette); CASE_RETURN(ID_PC, PaintCurve); CASE_RETURN(ID_CF, CacheFile); + CASE_RETURN(ID_VO, Volume); } return 0; #undef CASE_RETURN @@ -1257,6 +1269,9 @@ void BKE_libblock_init_empty(ID *id) case ID_CF: BKE_cachefile_init((CacheFile *)id); break; + case ID_VO: + BKE_volume_init((Volume *)id); + break; case ID_KE: /* Shapekeys are a complex topic too - they depend on their 'user' data type... * They are not linkable, though, so it should never reach here anyway. */ diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index d59658a2a07..cb44cf89ef6 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -61,6 +61,7 @@ #include "DNA_sound_types.h" #include "DNA_text_types.h" #include "DNA_vfont_types.h" +#include "DNA_volume_types.h" #include "DNA_world_types.h" #include "BLI_utildefines.h" @@ -990,6 +991,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call case ID_PAL: case ID_PC: case ID_CF: + case ID_VO: break; /* Deprecated. */ @@ -1065,7 +1067,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used) case ID_OB: /* Could be the following, but simpler to just always say 'yes' here. */ #if 0 - return ELEM(id_type_used, ID_ME, ID_CU, ID_MB, ID_LT, ID_SPK, ID_AR, ID_LA, ID_CA, /* obdata */ + return ELEM(id_type_used, ID_ME, ID_CU, ID_MB, ID_LT, ID_SPK, ID_AR, ID_LA, ID_CA, ID_VO, /* obdata */ ID_OB, ID_MA, ID_GD, ID_GR, ID_TE, ID_PA, ID_TXT, ID_SO, ID_MC, ID_IM, ID_AC /* + constraints, modifiers and game logic ID types... */); #else @@ -1125,6 +1127,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used) case ID_PAL: case ID_PC: case ID_CF: + case ID_VO: /* Those types never use/reference other IDs... */ return false; case ID_IP: diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 2819b0312aa..c0381a643d0 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -59,6 +59,7 @@ #include "DNA_sound_types.h" #include "DNA_text_types.h" #include "DNA_vfont_types.h" +#include "DNA_volume_types.h" #include "DNA_windowmanager_types.h" #include "DNA_world_types.h" @@ -106,6 +107,7 @@ #include "BKE_scene.h" #include "BKE_text.h" #include "BKE_texture.h" +#include "BKE_volume.h" #include "BKE_world.h" #ifdef WITH_PYTHON @@ -857,6 +859,9 @@ void BKE_libblock_free_datablock(ID *id, const int UNUSED(flag)) case ID_CF: BKE_cachefile_free((CacheFile *)id); break; + case ID_VO: + BKE_volume_free((Volume *)id); + break; } } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 86326655cfe..74bb8added9 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -117,6 +117,7 @@ #include "BKE_material.h" #include "BKE_camera.h" #include "BKE_image.h" +#include "BKE_volume.h" #ifdef WITH_MOD_FLUID #include "LBM_fluidsim.h" @@ -558,6 +559,7 @@ static const char *get_obdata_defname(int type) case OB_LATTICE: return DATA_("Lattice"); case OB_ARMATURE: return DATA_("Armature"); case OB_SPEAKER: return DATA_("Speaker"); + case OB_VOLUME: return DATA_("Volume"); case OB_EMPTY: return DATA_("Empty"); default: printf("get_obdata_defname: Internal error, bad type: %d\n", type); @@ -582,6 +584,7 @@ void *BKE_object_obdata_add_from_type(Main *bmain, int type, const char *name) case OB_LATTICE: return BKE_lattice_add(bmain, name); case OB_ARMATURE: return BKE_armature_add(bmain, name); case OB_SPEAKER: return BKE_speaker_add(bmain, name); + case OB_VOLUME: return BKE_volume_add(bmain, name); case OB_EMPTY: return NULL; default: printf("%s: Internal error, bad type: %d\n", __func__, type); diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index da455faaa86..b9130cb7091 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -46,6 +46,7 @@ #include "DNA_ID.h" #include "DNA_packedFile_types.h" #include "DNA_sound_types.h" +#include "DNA_volume_types.h" #include "DNA_vfont_types.h" #include "BLI_blenlib.h" @@ -58,6 +59,7 @@ #include "BKE_packedFile.h" #include "BKE_report.h" #include "BKE_sound.h" +#include "BKE_volume.h" int seekPackedFile(PackedFile *pf, int offset, int whence) { @@ -124,6 +126,7 @@ int countPackedFiles(Main *bmain) Image *ima; VFont *vf; bSound *sound; + Volume *volume; int count = 0; /* let's check if there are packed files... */ @@ -139,6 +142,10 @@ int countPackedFiles(Main *bmain) if (sound->packedfile) count++; + for (volume = bmain->volume.first; volume; volume = volume->id.next) + if (volume->packedfile) + count++; + return count; } @@ -229,6 +236,7 @@ void packAll(Main *bmain, ReportList *reports, bool verbose) Image *ima; VFont *vfont; bSound *sound; + Volume *volume; int tot = 0; for (ima = bmain->image.first; ima; ima = ima->id.next) { @@ -258,6 +266,13 @@ void packAll(Main *bmain, ReportList *reports, bool verbose) } } + for (volume = bmain->volume.first; volume; volume = volume->id.next) { + if (volume->packedfile == NULL && !ID_IS_LINKED(volume)) { + volume->packedfile = newPackedFile(reports, volume->filepath, bmain->name); + tot++; + } + } + if (tot > 0) BKE_reportf(reports, RPT_INFO, "Packed %d files", tot); else if (verbose) @@ -524,6 +539,9 @@ static void unpack_generate_paths( case ID_IM: BLI_snprintf(r_relpath, relpathlen, "//textures/%s", tempname); break; + case ID_VO: + BLI_snprintf(r_relpath, relpathlen, "//volumes/%s", tempname); + break; default: break; } @@ -628,6 +646,31 @@ int unpackImage(Main *bmain, ReportList *reports, Image *ima, int how) return(ret_value); } +int unpackVolume(Main *bmain, ReportList *reports, Volume *volume, int how) +{ + char localname[FILE_MAX], absname[FILE_MAX]; + char *newfilepath; + int ret_value = RET_ERROR; + + if (volume != NULL) { + unpack_generate_paths(volume->filepath, (ID *)volume, absname, localname, sizeof(absname), sizeof(localname)); + newfilepath = unpackFile(reports, BKE_main_blendfile_path(bmain), absname, localname, volume->packedfile, how); + if (newfilepath != NULL) { + BLI_strncpy(volume->filepath, newfilepath, sizeof(volume->filepath)); + MEM_freeN(newfilepath); + + freePackedFile(volume->packedfile); + volume->packedfile = NULL; + + BKE_volume_reload(bmain, volume); + + ret_value = RET_OK; + } + } + + return(ret_value); +} + int unpackLibraries(Main *bmain, ReportList *reports) { Library *lib; @@ -678,6 +721,7 @@ void unpackAll(Main *bmain, ReportList *reports, int how) Image *ima; VFont *vf; bSound *sound; + Volume *volume; for (ima = bmain->image.first; ima; ima = ima->id.next) if (BKE_image_has_packedfile(ima)) @@ -690,6 +734,10 @@ void unpackAll(Main *bmain, ReportList *reports, int how) for (sound = bmain->sound.first; sound; sound = sound->id.next) if (sound->packedfile) unpackSound(bmain, reports, sound, how); + + for (volume = bmain->volume.first; volume; volume = volume->id.next) + if (volume->packedfile) + unpackVolume(bmain, reports, volume, how); } /* ID should be not NULL, return 1 if there's a packed file */ @@ -711,6 +759,11 @@ bool BKE_pack_check(ID *id) bSound *snd = (bSound *)id; return snd->packedfile != NULL; } + case ID_VO: + { + Volume *volume = (Volume *)id; + return volume->packedfile != NULL; + } case ID_LI: { Library *li = (Library *)id; @@ -750,6 +803,14 @@ void BKE_unpack_id(Main *bmain, ID *id, ReportList *reports, int how) } break; } + case ID_VO: + { + Volume *volume = (Volume *)id; + if (volume->packedfile) { + unpackVolume(bmain, reports, volume, how); + } + break; + } case ID_LI: { Library *li = (Library *)id; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index a1003910ca3..881f875ccc0 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1676,7 +1676,8 @@ static bool scene_need_update_objects(Main *bmain) DAG_id_type_tagged(bmain, ID_CA) || /* Camera */ DAG_id_type_tagged(bmain, ID_KE) || /* KE */ DAG_id_type_tagged(bmain, ID_SPK) || /* Speaker */ - DAG_id_type_tagged(bmain, ID_AR); /* Armature */ + DAG_id_type_tagged(bmain, ID_AR) || /* Armature */ + DAG_id_type_tagged(bmain, ID_VO); /* Volume */ } static void scene_update_objects(EvaluationContext *eval_ctx, Main *bmain, Scene *scene, Scene *scene_parent) diff --git a/source/blender/blenkernel/intern/volume.c b/source/blender/blenkernel/intern/volume.c new file mode 100644 index 00000000000..959a5924204 --- /dev/null +++ b/source/blender/blenkernel/intern/volume.c @@ -0,0 +1,138 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Brecht Van Lommel. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenkernel/intern/volume.c + * \ingroup bke + */ + +#include "MEM_guardedalloc.h" + +#include "DNA_object_types.h" +#include "DNA_sound_types.h" +#include "DNA_volume_types.h" + +#include "BLI_listbase.h" +#include "BLI_math.h" +#include "BLI_string.h" +#include "BLI_utildefines.h" + +#include "BKE_animsys.h" +#include "BKE_global.h" +#include "BKE_library.h" +#include "BKE_library_query.h" +#include "BKE_library_remap.h" +#include "BKE_main.h" +#include "BKE_packedFile.h" +#include "BKE_volume.h" + +#ifdef WITH_OPENVDB +#include "openvdb_capi.h" +#endif + +/* OpenVDB integration */ + +static void volume_create_openvdb(Volume *volume) +{ + if (!volume->filepath[0]) { + return; + } + +#ifdef WITH_OPENVDB + OpenVDBReader *reader = OpenVDBReader_create(); + OpenVDBReader_open(reader, volume->filepath); + + size_t num_grids = OpenVDBReader_num_grids(reader); + + for (int i = 0; i < num_grids; i++) { + VolumeGrid *grid = MEM_callocN(sizeof(VolumeGrid), "VolumeGrid"); + const char *name = OpenVDBReader_grid_name(reader, i); + BLI_strncpy(grid->name, name, sizeof(grid->name)); + BLI_addtail(&volume->grids, grid); + } + + OpenVDBReader_free(reader); +#endif +} + +static void volume_free_openvdb(Volume *volume) +{ +#ifdef WITH_OPENVDB + BLI_freelistN(&volume->grids); +#endif +} + +/* Volume datablock */ + +void BKE_volume_init(Volume *volume) +{ + BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(volume, id)); + + volume->filepath[0] = '\0'; + volume->packedfile = NULL; + BLI_listbase_clear(&volume->grids); + volume->flag = 0; +} + +void *BKE_volume_add(Main *bmain, const char *name) +{ + Volume *volume; + + volume = BKE_libblock_alloc(bmain, ID_VO, name, 0); + + BKE_volume_init(volume); + + return volume; +} + +void BKE_volume_copy_data(Main *bmain, Volume *volume_dst, const Volume *UNUSED(volume_src), const int UNUSED(flag)) +{ + if (volume_dst->packedfile) { + volume_dst->packedfile = dupPackedFile(volume_dst->packedfile); + } + + BLI_listbase_clear(&volume_dst->grids); + BKE_volume_reload(bmain, volume_dst); +} + +Volume *BKE_volume_copy(Main *bmain, const Volume *volume) +{ + Volume *volume_copy; + BKE_id_copy_ex(bmain, &volume->id, (ID **)&volume_copy, 0, false); + return volume_copy; +} + +void BKE_volume_make_local(Main *bmain, Volume *volume, const bool lib_local) +{ + BKE_id_make_local_generic(bmain, &volume->id, true, lib_local); +} + +void BKE_volume_free(Volume *volume) +{ + BKE_animdata_free((ID *)volume, false); + volume_free_openvdb(volume); +} + +void BKE_volume_reload(Main *UNUSED(bmain), Volume *volume) +{ + volume_free_openvdb(volume); + volume_create_openvdb(volume); +} diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 7488d62bb3c..ded3faac37b 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -399,6 +399,9 @@ BlendFileData *BLO_read_from_memfile( /* make lookups of existing sound data in old main */ blo_make_sound_pointer_map(fd, oldmain); + /* make lookups of existing volume data in old main */ + blo_make_volume_pointer_map(fd, oldmain); + /* removed packed data from this trick - it's internal data that needs saves */ bfd = blo_read_file_internal(fd, filename); @@ -412,6 +415,9 @@ BlendFileData *BLO_read_from_memfile( /* ensures relinked sounds are not freed */ blo_end_sound_pointer_map(fd, oldmain); + /* ensures relinked volumes are not freed */ + blo_end_volume_pointer_map(fd, oldmain); + /* Still in-use libraries have already been moved from oldmain to new mainlist, * but oldmain itself shall *never* be 'transferred' to new mainlist! */ BLI_assert(old_mainlist.first == oldmain); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4e845b9a60d..1142a6ca31d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -99,6 +99,7 @@ #include "DNA_sound_types.h" #include "DNA_space_types.h" #include "DNA_vfont_types.h" +#include "DNA_volume_types.h" #include "DNA_world_types.h" #include "DNA_movieclip_types.h" #include "DNA_mask_types.h" @@ -1329,6 +1330,8 @@ void blo_freefiledata(FileData *fd) oldnewmap_free(fd->movieclipmap); if (fd->soundmap) oldnewmap_free(fd->soundmap); + if (fd->volumemap) + oldnewmap_free(fd->volumemap); if (fd->packedmap) oldnewmap_free(fd->packedmap); if (fd->libmap && !(fd->flags & FD_FLAGS_NOT_MY_LIBMAP)) @@ -1528,6 +1531,13 @@ static void *newsoundadr(FileData *fd, const void *adr) /* used to restore return NULL; } +static void *newvolumeadr(FileData *fd, const void *adr) /* used to restore volume data after undo */ +{ + if (fd->volumemap && adr) + return oldnewmap_lookup_and_inc(fd->volumemap, adr, true); + return NULL; +} + static void *newpackedadr(FileData *fd, const void *adr) /* used to restore packed data after undo */ { if (fd->packedmap && adr) @@ -1790,6 +1800,43 @@ void blo_end_sound_pointer_map(FileData *fd, Main *oldmain) } } +void blo_make_volume_pointer_map(FileData *fd, Main *oldmain) +{ + fd->volumemap = oldnewmap_new(); + + Volume *volume = oldmain->volume.first; + for (; volume; volume = volume->id.next) { + for (VolumeGrid *grid = volume->grids.first; grid; grid = grid->next) { + if (grid->openvdb_handle) { + oldnewmap_insert(fd->volumemap, grid->openvdb_handle, grid->openvdb_handle, 0); + } + } + } +} + +/* set old main volume caches to zero if it has been restored */ +/* this works because freeing old main only happens after this call */ +void blo_end_volume_pointer_map(FileData *fd, Main *oldmain) +{ + OldNew *entry = fd->volumemap->entries; + Volume *volume = oldmain->volume.first; + int i; + + /* used entries were restored, so we put them to zero */ + for (i = 0; i < fd->volumemap->nentries; i++, entry++) { + if (entry->nr > 0) + entry->newp = NULL; + } + + for (; volume; volume = volume->id.next) { + for (VolumeGrid *grid = volume->grids.first; grid; grid = grid->next) { + if (grid->openvdb_handle) { + grid->openvdb_handle = newvolumeadr(fd, grid->openvdb_handle); + } + } + } +} + /* XXX disabled this feature - packed files also belong in temp saves and quit.blend, to make restore work */ static void insert_packedmap(FileData *fd, PackedFile *pf) @@ -1803,6 +1850,7 @@ void blo_make_packed_pointer_map(FileData *fd, Main *oldmain) Image *ima; VFont *vfont; bSound *sound; + Volume *volume; Library *lib; fd->packedmap = oldnewmap_new(); @@ -1826,6 +1874,10 @@ void blo_make_packed_pointer_map(FileData *fd, Main *oldmain) if (sound->packedfile) insert_packedmap(fd, sound->packedfile); + for (volume = oldmain->volume.first; volume; volume = volume->id.next) + if (volume->packedfile) + insert_packedmap(fd, volume->packedfile); + for (lib = oldmain->library.first; lib; lib = lib->id.next) if (lib->packedfile) insert_packedmap(fd, lib->packedfile); @@ -1839,6 +1891,7 @@ void blo_end_packed_pointer_map(FileData *fd, Main *oldmain) Image *ima; VFont *vfont; bSound *sound; + Volume *volume; Library *lib; OldNew *entry = fd->packedmap->entries; int i; @@ -1864,6 +1917,9 @@ void blo_end_packed_pointer_map(FileData *fd, Main *oldmain) for (sound = oldmain->sound.first; sound; sound = sound->id.next) sound->packedfile = newpackedadr(fd, sound->packedfile); + for (volume = oldmain->volume.first; volume; volume = volume->id.next) + volume->packedfile = newpackedadr(fd, volume->packedfile); + for (lib = oldmain->library.first; lib; lib = lib->id.next) lib->packedfile = newpackedadr(fd, lib->packedfile); } @@ -8094,6 +8150,39 @@ static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle) } } +/* ************ READ VOLUME ***************** */ + +static void lib_link_volume(FileData *fd, Main *main) +{ + for (Volume *volume = main->volume.first; volume; volume = volume->id.next) { + if (volume->id.tag & LIB_TAG_NEED_LINK) { + IDP_LibLinkProperty(volume->id.properties, fd); + lib_link_animdata(fd, &volume->id, volume->adt); + + volume->id.tag &= ~LIB_TAG_NEED_LINK; + } + } +} + +static void direct_link_volume(FileData *fd, Volume *volume) +{ + volume->adt = newdataadr(fd, volume->adt); + direct_link_animdata(fd, volume->adt); + + volume->packedfile = direct_link_packedfile(fd, volume->packedfile); + + link_list(fd, &volume->grids); + + for (VolumeGrid *grid = volume->grids.first; grid; grid = grid->next) { + if (fd->volumemap) { + grid->openvdb_handle = newvolumeadr(fd, grid->openvdb_handle); + } + else { + grid->openvdb_handle = NULL; + } + } +} + /* ************** GENERAL & MAIN ******************** */ @@ -8134,6 +8223,7 @@ static const char *dataname(short id_code) case ID_MSK: return "Data from MSK"; case ID_LS: return "Data from LS"; case ID_CF: return "Data from CF"; + case ID_VO: return "Data from VO"; } return "Data from Lib Block"; @@ -8382,6 +8472,9 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short case ID_CF: direct_link_cachefile(fd, (CacheFile *)id); break; + case ID_VO: + direct_link_volume(fd, (Volume *)id); + break; } oldnewmap_free_unused(fd->datamap); @@ -8577,6 +8670,7 @@ static void lib_link_all(FileData *fd, Main *main) lib_link_linestyle(fd, main); lib_link_gpencil(fd, main); lib_link_cachefiles(fd, main); + lib_link_volume(fd, main); lib_link_library(fd, main); /* only init users */ } @@ -9841,6 +9935,12 @@ static void expand_gpencil(FileData *fd, Main *mainvar, bGPdata *gpd) expand_animdata(fd, mainvar, gpd->adt); } +static void expand_volume(FileData *fd, Main *mainvar, Volume *volume) +{ + if (volume->adt) + expand_animdata(fd, mainvar, volume->adt); +} + /** * Set the callback func used over all ID data found by \a BLO_expand_main func. * @@ -9955,6 +10055,9 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) case ID_CF: expand_cachefile(fd, mainvar, (CacheFile *)id); break; + case ID_VO: + expand_volume(fd, mainvar, (Volume *)id); + break; default: break; } diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index 66161d86f02..d92063507f9 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -89,6 +89,7 @@ typedef struct FileData { struct OldNewMap *imamap; struct OldNewMap *movieclipmap; struct OldNewMap *soundmap; + struct OldNewMap *volumemap; struct OldNewMap *packedmap; struct BHeadSort *bheadmap; @@ -142,6 +143,8 @@ void blo_make_movieclip_pointer_map(FileData *fd, Main *oldmain); void blo_end_movieclip_pointer_map(FileData *fd, Main *oldmain); void blo_make_sound_pointer_map(FileData *fd, Main *oldmain); void blo_end_sound_pointer_map(FileData *fd, Main *oldmain); +void blo_make_volume_pointer_map(FileData *fd, Main *oldmain); +void blo_end_volume_pointer_map(FileData *fd, Main *oldmain); void blo_make_packed_pointer_map(FileData *fd, Main *oldmain); void blo_end_packed_pointer_map(FileData *fd, Main *oldmain); void blo_add_library_pointer_map(ListBase *old_mainlist, FileData *fd); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e3a901f4211..78ee85413fa 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -144,6 +144,7 @@ #include "DNA_text_types.h" #include "DNA_view3d_types.h" #include "DNA_vfont_types.h" +#include "DNA_volume_types.h" #include "DNA_world_types.h" #include "DNA_windowmanager_types.h" #include "DNA_movieclip_types.h" @@ -3621,6 +3622,25 @@ static void write_cachefile(WriteData *wd, CacheFile *cache_file) } } +static void write_volume(WriteData *wd, Volume *volume) +{ + if (volume->id.us > 0 || wd->use_memfile) { + /* write LibData */ + writestruct(wd, ID_VO, Volume, 1, volume); + write_iddata(wd, &volume->id); + + if (volume->adt) { + write_animdata(wd, volume->adt); + } + + if (volume->packedfile) { + PackedFile *pf = volume->packedfile; + writestruct(wd, DATA, PackedFile, 1, pf); + writedata(wd, DATA, pf->size, pf->data); + } + } +} + /* Keep it last of write_foodata functions. */ static void write_libraries(WriteData *wd, Main *main) { @@ -3895,6 +3915,9 @@ static bool write_file_handle( case ID_CF: write_cachefile(wd, (CacheFile *)id); break; + case ID_VO: + write_volume(wd, (Volume *)id); + break; case ID_LI: /* Do nothing, handled below - and should never be reached. */ BLI_assert(0); diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index e9daf29a94c..32e4d3dfac0 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -148,6 +148,7 @@ bool BLT_lang_is_ime_supported(void); #define BLT_I18NCONTEXT_ID_TEXTURE "Texture" #define BLT_I18NCONTEXT_ID_TEXT "Text" #define BLT_I18NCONTEXT_ID_VFONT "VFont" +#define BLT_I18NCONTEXT_ID_VOLUME "Volume" #define BLT_I18NCONTEXT_ID_WORLD "World" #define BLT_I18NCONTEXT_ID_WINDOWMANAGER "WindowManager" #define BLT_I18NCONTEXT_ID_MOVIECLIP "MovieClip" @@ -202,6 +203,7 @@ typedef struct { BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXTURE, "id_texture"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXT, "id_text"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_VFONT, "id_vfont"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_VOLUME, "id_volume"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORLD, "id_world"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \ {NULL, NULL, NULL} \ diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 1ea4c7ead77..e1230b4c386 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -58,6 +58,7 @@ #include "DNA_world_types.h" #include "DNA_gpencil_types.h" #include "DNA_speaker_types.h" +#include "DNA_volume_types.h" #include "DNA_mask_types.h" #include "RNA_access.h" @@ -643,6 +644,8 @@ static int acf_object_icon(bAnimListElem *ale) return ICON_OUTLINER_OB_FONT; case OB_SURF: return ICON_OUTLINER_OB_SURFACE; + case OB_VOLUME: + return ICON_OUTLINER_OB_VOLUME; case OB_EMPTY: return ICON_OUTLINER_OB_EMPTY; default: @@ -2630,6 +2633,83 @@ static bAnimChannelType ACF_DSSPK = acf_dsspk_setting_ptr /* pointer for setting */ }; +/* Volume Expander ------------------------------------------- */ + +// TODO: just get this from RNA? +static int acf_dsvolume_icon(bAnimListElem *UNUSED(ale)) +{ + return ICON_VOLUME; +} + +/* get the appropriate flag(s) for the setting when it is valid */ +static int acf_dsvolume_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings setting, bool *neg) +{ + /* clear extra return data first */ + *neg = false; + + switch (setting) { + case ACHANNEL_SETTING_EXPAND: /* expanded */ + return VO_DS_EXPAND; + + case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */ + return ADT_NLA_EVAL_OFF; + + case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */ + *neg = true; + return ADT_CURVES_NOT_VISIBLE; + + case ACHANNEL_SETTING_SELECT: /* selected */ + return ADT_UI_SELECTED; + + default: /* unsupported */ + return 0; + } +} + +/* get pointer to the setting */ +static void *acf_dsvolume_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type) +{ + Volume *volume = (Volume *)ale->data; + + /* clear extra return data first */ + *type = 0; + + switch (setting) { + case ACHANNEL_SETTING_EXPAND: /* expanded */ + return GET_ACF_FLAG_PTR(volume->flag, type); + + case ACHANNEL_SETTING_SELECT: /* selected */ + case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ + case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ + if (volume->adt) + return GET_ACF_FLAG_PTR(volume->adt->flag, type); + return NULL; + + default: /* unsupported */ + return NULL; + } +} + +/* volume expander type define */ +static bAnimChannelType ACF_DSVOLUME = +{ + "Volume Expander", /* type name */ + ACHANNEL_ROLE_EXPANDER, /* role */ + + acf_generic_dataexpand_color, /* backdrop color */ + acf_generic_dataexpand_backdrop, /* backdrop */ + acf_generic_indention_1, /* indent level */ + acf_generic_basic_offset, /* offset */ + + acf_generic_idblock_name, /* name */ + acf_generic_idblock_name_prop, /* name prop */ + acf_dsvolume_icon, /* icon */ + + acf_generic_dataexpand_setting_valid, /* has setting */ + acf_dsvolume_setting_flag, /* flag for setting */ + acf_dsvolume_setting_ptr /* pointer for setting */ +}; + /* GPencil Expander ------------------------------------------- */ // TODO: just get this from RNA? @@ -3591,6 +3671,7 @@ static void ANIM_init_channel_typeinfo_data(void) animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */ animchannelTypeInfo[type++] = &ACF_DSGPENCIL; /* GreasePencil Channel */ animchannelTypeInfo[type++] = &ACF_DSMCLIP; /* MovieClip Channel */ + animchannelTypeInfo[type++] = &ACF_DSVOLUME; /* Volume Channel */ animchannelTypeInfo[type++] = &ACF_SHAPEKEY; /* ShapeKey */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 75557e60e21..787e1461897 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -134,6 +134,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: case ANIMTYPE_DSMCLIP: + case ANIMTYPE_DSVOLUME: { /* need to verify that this data is valid for now */ if (ale->adt) { @@ -192,6 +193,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat case ANIMTYPE_DSTEX: case ANIMTYPE_DSGPENCIL: case ANIMTYPE_DSMCLIP: + case ANIMTYPE_DSVOLUME: { /* need to verify that this data is valid for now */ if (ale && ale->adt) { @@ -321,6 +323,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: case ANIMTYPE_DSMCLIP: + case ANIMTYPE_DSVOLUME: { if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED)) sel = ACHANNEL_SETFLAG_CLEAR; @@ -418,6 +421,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: case ANIMTYPE_DSMCLIP: + case ANIMTYPE_DSVOLUME: { /* need to verify that this data is valid for now */ if (ale->adt) { @@ -2747,6 +2751,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: case ANIMTYPE_DSMCLIP: + case ANIMTYPE_DSVOLUME: { /* sanity checking... */ if (ale->adt) { diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 4659fc2ca18..72c2adf8a34 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -70,6 +70,7 @@ #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_speaker_types.h" +#include "DNA_volume_types.h" #include "DNA_world_types.h" #include "DNA_gpencil_types.h" #include "DNA_object_types.h" @@ -752,6 +753,19 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->adt = BKE_animdata_from_id(data); break; } + case ANIMTYPE_DSVOLUME: + { + Volume *volume = (Volume *)data; + AnimData *adt = volume->adt; + + ale->flag = FILTER_VOLUME_OBJD(volume); + + ale->key_data = (adt) ? adt->action : NULL; + ale->datatype = ALE_ACT; + + ale->adt = BKE_animdata_from_id(data); + break; + } case ANIMTYPE_DSSKEY: { Key *key = (Key *)data; @@ -2425,6 +2439,14 @@ static size_t animdata_filter_ds_obdata(bAnimContext *ac, ListBase *anim_data, b expanded = FILTER_SPK_OBJD(spk); break; } + case OB_VOLUME: /* ---------- Volume ----------- */ + { + Volume *volume = (Volume *)ob->data; + + type = ANIMTYPE_DSVOLUME; + expanded = FILTER_VOLUME_OBJD(volume); + break; + } } /* add object data animation channels */ diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 28dc233e1c8..95cb4aaa24d 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -182,6 +182,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_DSSPK, ANIMTYPE_DSGPENCIL, ANIMTYPE_DSMCLIP, + ANIMTYPE_DSVOLUME, ANIMTYPE_SHAPEKEY, @@ -296,6 +297,7 @@ typedef enum eAnimFilter_Flags { #define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND))) #define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND))) #define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND))) +#define FILTER_VOLUME_OBJD(vo) (CHECK_TYPE_INLINE(vo, Volume *), ((vo->flag & VO_DS_EXPAND))) /* Variable use expanders */ #define FILTER_NTREE_DATA(ntree) (CHECK_TYPE_INLINE(ntree, bNodeTree *), ((ntree->flag & NTREE_DS_EXPAND))) #define FILTER_TEX_DATA(tex) (CHECK_TYPE_INLINE(tex, Tex *), ((tex->flag & TEX_DS_EXPAND))) diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 24a44fe307c..d2dbd1dc538 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -135,8 +135,8 @@ DEF_ICON(PARTICLES) DEF_ICON(PHYSICS) DEF_ICON(SPEAKER) DEF_ICON(TEXTURE_SHADED) +DEF_ICON(VOLUME) #ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK042) DEF_ICON(BLANK043) DEF_ICON(BLANK044) DEF_ICON(BLANK045) @@ -235,9 +235,7 @@ DEF_ICON(CONSTRAINT_BONE) DEF_ICON(CAMERA_STEREO) DEF_ICON(PACKAGE) DEF_ICON(UGLYPACKAGE) -#ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK079b) -#endif +DEF_ICON(VOLUME_DATA) /* TODO */ /* DATA */ DEF_ICON(BRUSH_DATA) @@ -315,8 +313,8 @@ DEF_ICON(OUTLINER_OB_SURFACE) DEF_ICON(OUTLINER_OB_SPEAKER) DEF_ICON(OUTLINER_OB_FORCE_FIELD) DEF_ICON(OUTLINER_OB_GROUP_INSTANCE) +DEF_ICON(OUTLINER_OB_VOLUME) #ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK122) DEF_ICON(BLANK123) DEF_ICON(BLANK124) DEF_ICON(BLANK125) @@ -348,7 +346,9 @@ DEF_ICON(OUTLINER_DATA_SPEAKER) DEF_ICON(OUTLINER_DATA_POSE) #ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK130) - DEF_ICON(BLANK131) +#endif +DEF_ICON(OUTLINER_DATA_VOLUME) +#ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK132) DEF_ICON(BLANK133) DEF_ICON(BLANK134) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index eed7f2ec0f2..2568f97707c 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1356,6 +1356,8 @@ int UI_idcode_icon_get(const int idcode) return ICON_TEXT; case ID_VF: return ICON_FONT_DATA; + case ID_VO: + return ICON_VOLUME; case ID_WO: return ICON_WORLD_DATA; default: diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index bd4bb032717..f89edf12a8f 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -455,6 +455,7 @@ static const char *template_id_browse_tip(StructRNA *type) case ID_PAL: return N_("Browse Palette Data to be linked"); case ID_PC: return N_("Browse Paint Curve Data to be linked"); case ID_CF: return N_("Browse Cache Files to be linked"); + case ID_VO: return N_("Browse Volume Data to be linked"); } } return N_("Browse ID data to be linked"); @@ -619,6 +620,7 @@ static void template_ID( BLT_I18NCONTEXT_ID_PARTICLESETTINGS, BLT_I18NCONTEXT_ID_GPENCIL, BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, + BLT_I18NCONTEXT_ID_VOLUME, ); if (newop) { diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index e977dea6140..ffad5f0400b 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -90,6 +90,7 @@ #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_speaker.h" +#include "BKE_volume.h" #include "RNA_access.h" #include "RNA_define.h" @@ -1095,6 +1096,39 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } +/********************* Add Volume Operator ********************/ + +static int object_volume_add_exec(bContext *C, wmOperator *op) +{ + Object *ob; + unsigned int layer; + float loc[3], rot[3]; + + if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) + return OPERATOR_CANCELLED; + + ob = ED_object_add_type(C, OB_VOLUME, NULL, loc, rot, false, layer); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_volume_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Add volume"; + ot->description = "Add a volume object to the scene"; + ot->idname = "OBJECT_OT_volume_add"; + + /* api callbacks */ + ot->exec = object_volume_add_exec; + ot->poll = ED_operator_objectmode; + + /* flags */ + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + + ED_object_add_generic_props(ot, true); +} + /**************************** Delete Object *************************/ static void object_delete_check_glsl_update(Object *ob) @@ -2182,6 +2216,15 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base } id_us_min(id); } + case OB_VOLUME: + if (dupflag != 0) { + ID_NEW_REMAP_US2(obn->data) + else { + obn->data = ID_NEW_SET(obn->data, BKE_volume_copy(bmain, obn->data)); + didit = 1; + } + id_us_min(id); + } break; } diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index f962f83844b..6fe9131eb8d 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -122,6 +122,7 @@ void OBJECT_OT_lamp_add(struct wmOperatorType *ot); void OBJECT_OT_effector_add(struct wmOperatorType *ot); void OBJECT_OT_camera_add(struct wmOperatorType *ot); void OBJECT_OT_speaker_add(struct wmOperatorType *ot); +void OBJECT_OT_volume_add(struct wmOperatorType *ot); void OBJECT_OT_group_instance_add(struct wmOperatorType *ot); void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot); diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 407cddedbb0..7d8a51ea292 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -117,6 +117,7 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_lamp_add); WM_operatortype_append(OBJECT_OT_camera_add); WM_operatortype_append(OBJECT_OT_speaker_add); + WM_operatortype_append(OBJECT_OT_volume_add); WM_operatortype_append(OBJECT_OT_add); WM_operatortype_append(OBJECT_OT_add_named); WM_operatortype_append(OBJECT_OT_effector_add); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 286a7e09581..5404fe9b3de 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -91,6 +91,7 @@ #include "BKE_speaker.h" #include "BKE_texture.h" #include "BKE_editmesh.h" +#include "BKE_volume.h" #include "WM_api.h" #include "WM_types.h" @@ -1919,6 +1920,9 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag) case OB_SPEAKER: ob->data = ID_NEW_SET(ob->data, BKE_speaker_copy(bmain, ob->data)); break; + case OB_VOLUME: + ob->data = ID_NEW_SET(ob->data, BKE_volume_copy(bmain, ob->data)); + break; default: if (G.debug & G_DEBUG) printf("ERROR %s: can't copy %s\n", __func__, id->name); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index f5e0ccb60c7..d4fa95e928c 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -208,6 +208,7 @@ static int buttons_context_path_data(ButsContextPath *path, int type) else if (RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1; else if (RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1; else if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1; + else if (RNA_struct_is_a(ptr->type, &RNA_Volume) && (type == -1 || type == OB_VOLUME)) return 1; /* try to get an object in the path, no pinning supported here */ else if (buttons_context_path_object(path)) { ob = path->ptr[path->len - 1].data; @@ -744,7 +745,7 @@ const char *buttons_context_dir[] = { "texture", "texture_user", "texture_user_property", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", "particle_settings", "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", - "line_style", NULL + "line_style", "volume", NULL }; int buttons_context(const bContext *C, const char *member, bContextDataResult *result) @@ -809,6 +810,10 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r set_pointer_type(path, result, &RNA_Speaker); return 1; } + else if (CTX_data_equals(member, "volume")) { + set_pointer_type(path, result, &RNA_Volume); + return 1; + } else if (CTX_data_equals(member, "material")) { set_pointer_type(path, result, &RNA_Material); return 1; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 09e2660a762..abb350515d0 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2335,9 +2335,9 @@ static void filelist_readjob_main_rec(Main *bmain, FileList *filelist) if (filelist->dir[0] == 0) { /* make directories */ #ifdef WITH_FREESTYLE - filelist->filelist.nbr_entries = 24; + filelist->filelist.nbr_entries = 25; #else - filelist->filelist.nbr_entries = 23; + filelist->filelist.nbr_entries = 24; #endif filelist_resize(filelist, filelist->filelist.nbr_entries); @@ -2368,8 +2368,9 @@ static void filelist_readjob_main_rec(Main *bmain, FileList *filelist) filelist->filelist.entries[20].entry->relpath = BLI_strdup("Action"); filelist->filelist.entries[21].entry->relpath = BLI_strdup("NodeTree"); filelist->filelist.entries[22].entry->relpath = BLI_strdup("Speaker"); + filelist->filelist.entries[23].entry->relpath = BLI_strdup("Volume"); #ifdef WITH_FREESTYLE - filelist->filelist.entries[23].entry->relpath = BLI_strdup("FreestyleLineStyle"); + filelist->filelist.entries[24].entry->relpath = BLI_strdup("FreestyleLineStyle"); #endif } else { diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 1c86ecc327b..9f3be47c3c8 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -221,7 +221,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) FILTER_ID_GR | FILTER_ID_IM | FILTER_ID_LA | FILTER_ID_LS | FILTER_ID_LT | FILTER_ID_MA | FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME | FILTER_ID_MSK | FILTER_ID_NT | FILTER_ID_OB | FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_SCE | FILTER_ID_SPK | FILTER_ID_SO | - FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF; + FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF | FILTER_ID_VO; if (U.uiflag & USER_HIDE_DOT) { params->flag |= FILE_HIDE_DOT; diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 659a36c4a23..058ee5e2e0a 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -145,6 +145,7 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p case ANIMTYPE_DSLINESTYLE: case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: + case ANIMTYPE_DSVOLUME: { /* for these channels, we only do AnimData */ if (ale->adt && adt_ptr) { diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 9bb25724daf..e0c18082a60 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -184,6 +184,7 @@ static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channe case ANIMTYPE_DSLINESTYLE: case ANIMTYPE_DSSPK: case ANIMTYPE_DSGPENCIL: + case ANIMTYPE_DSVOLUME: { /* sanity checking... */ if (ale->adt) { diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index a35dffc0fcc..f92c60319d4 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1269,6 +1269,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_SURFACE); break; case OB_SPEAKER: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_SPEAKER); break; + case OB_VOLUME: + tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_VOLUME); break; case OB_EMPTY: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_EMPTY); break; } @@ -1332,6 +1334,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto tselem_draw_icon_uibut(&arg, ICON_SCRIPT); break; case ID_GR: tselem_draw_icon_uibut(&arg, ICON_GROUP); break; + case ID_VO: + tselem_draw_icon_uibut(&arg, ICON_VOLUME); break; case ID_LI: if (tselem->id->tag & LIB_TAG_MISSING) { tselem_draw_icon_uibut(&arg, ICON_LIBRARY_DATA_BROKEN); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 49647a0d838..e8243540921 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -61,7 +61,7 @@ typedef struct TreeElement { #define TREESTORE_ID_TYPE(_id) \ (ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \ - ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS) || \ + ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS, ID_VO) || \ ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_MC)) /* Only in 'blendfile' mode ... :/ */ /* TreeElement->flag */ diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 173b48cc731..95d63d804a1 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -53,6 +53,7 @@ #include "DNA_speaker_types.h" #include "DNA_object_types.h" #include "DNA_linestyle_types.h" +#include "DNA_volume_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" @@ -882,6 +883,14 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor } break; } + case ID_VO: + { + Volume *volume = (Volume *)id; + + if (outliner_animdata_test(volume->adt)) + outliner_add_element(soops, &te->subtree, volume, te, TSE_ANIM_DATA, 0); + break; + } default: break; } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c10f8f0ce16..c9e72514a4d 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2230,6 +2230,14 @@ static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D glDisable(GL_BLEND); } +/* flag similar to draw_object() */ +static void drawvolume(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D *UNUSED(rv3d), + Object *UNUSED(ob), int UNUSED(flag)) +{ + drawcube_size(1.0f); +} + + static void lattice_draw_verts(Lattice *lt, DispList *dl, BPoint *actbp, short sel) { BPoint *bp = lt->def; @@ -7766,6 +7774,9 @@ void draw_object(Main *bmain, Scene *scene, ARegion *ar, View3D *v3d, Base *base } } break; + case OB_VOLUME: + drawvolume(scene, v3d, rv3d, ob, dflag); + break; default: if (!render_override) { drawaxes(rv3d->viewmatob, 1.0, OB_ARROWS); diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 0c7341b0fae..0456862b00d 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -257,6 +257,7 @@ typedef enum ID_Type { ID_PAL = MAKE_ID2('P', 'L'), /* Palette */ ID_PC = MAKE_ID2('P', 'C'), /* PaintCurve */ ID_CF = MAKE_ID2('C', 'F'), /* CacheFile */ + ID_VO = MAKE_ID2('V', 'O'), /* Volume */ } ID_Type; /* Only used as 'placeholder' in .blend files for directly linked datablocks. */ @@ -401,6 +402,7 @@ enum { FILTER_ID_WO = (1 << 26), FILTER_ID_PA = (1 << 27), FILTER_ID_CF = (1 << 28), + FILTER_ID_VO = (1 << 29), }; /* IMPORTANT: this enum matches the order currently use in set_lisbasepointers, @@ -440,6 +442,7 @@ enum { INDEX_ID_SCE, INDEX_ID_WM, INDEX_ID_MSK, + INDEX_ID_VO, INDEX_ID_NULL, }; diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index e255b85ebe3..2cf60ce6f11 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -644,6 +644,7 @@ typedef enum eDopeSheet_Flag { ADS_FLAG_NO_DB_SORT = (1 << 3), /* do not sort datablocks (mostly objects) by name (NOTE: potentially expensive operation) */ /* NOTE: datablock filter flags continued (1 << 10) onwards... */ + ADS_FILTER_NOVOLUME = (1 << 10), /* TODO ADS_FILTER_NOOBDATA */ } eDopeSheet_Flag; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index a9b43a5a957..1742b0ed7cb 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -366,6 +366,7 @@ enum { /* 23 and 24 are for life and sector (old file compat.) */ OB_ARMATURE = 25, + OB_VOLUME = 26, }; /* check if the object type supports materials */ @@ -384,10 +385,10 @@ enum { /* is this ID type used as object data */ #define OB_DATA_SUPPORT_ID(_id_type) \ - (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_CA, ID_LT, ID_AR)) + (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_CA, ID_LT, ID_AR, ID_VO)) #define OB_DATA_SUPPORT_ID_CASE \ - ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR + ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR: case ID_VO /* partype: first 4 bits: type */ enum { diff --git a/source/blender/makesdna/DNA_volume_types.h b/source/blender/makesdna/DNA_volume_types.h new file mode 100644 index 00000000000..4de619fcccd --- /dev/null +++ b/source/blender/makesdna/DNA_volume_types.h @@ -0,0 +1,61 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Jörg Müller. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_volume_types.h + * \ingroup DNA + */ + +#ifndef __DNA_VOLUME_TYPES_H__ +#define __DNA_VOLUME_TYPES_H__ + +#include "DNA_ID.h" + +struct PackedFile; + +typedef struct VolumeGrid { + struct VolumeGrid *next, *prev; + + char name[64]; /* MAX_NAME */ + void *openvdb_handle; +} VolumeGrid; + +typedef struct Volume { + ID id; + struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ + + char filepath[1024]; /* FILE_MAX */ + + struct PackedFile *packedfile; + + ListBase grids; + + int flag; + int pad[3]; +} Volume; + +/* **************** VOLUME ********************* */ + +/* flag */ +#define VO_DS_EXPAND (1<<0) + +#endif /* __DNA_VOLUME_TYPES_H__ */ + diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 3b8d0e01ace..9d96db749c0 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -130,6 +130,7 @@ static const char *includefiles[] = { "DNA_freestyle_types.h", "DNA_linestyle_types.h", "DNA_cachefile_types.h", + "DNA_volume_types.h", /* see comment above before editing! */ /* empty string to indicate end of includefiles */ @@ -1343,4 +1344,5 @@ int main(int argc, char **argv) #include "DNA_freestyle_types.h" #include "DNA_linestyle_types.h" #include "DNA_cachefile_types.h" +#include "DNA_volume_types.h" /* end of list */ diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index ffada6efd02..22754bce916 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -698,6 +698,7 @@ extern StructRNA RNA_WaveModifier; extern StructRNA RNA_VertexWeightEditModifier; extern StructRNA RNA_VertexWeightMixModifier; extern StructRNA RNA_VertexWeightProximityModifier; +extern StructRNA RNA_Volume; extern StructRNA RNA_Window; extern StructRNA RNA_WindowManager; extern StructRNA RNA_WipeSequence; diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 5e7438ce4ee..5be1c233071 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -93,6 +93,7 @@ set(DEFSRC rna_ui.c rna_userdef.c rna_vfont.c + rna_volume.c rna_wm.c rna_world.c ) diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 4b58e13d994..5998622b5c0 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3407,6 +3407,7 @@ static RNAProcessItem PROCESS_ITEMS[] = { {"rna_ui.c", "rna_ui_api.c", RNA_def_ui}, {"rna_userdef.c", NULL, RNA_def_userdef}, {"rna_vfont.c", "rna_vfont_api.c", RNA_def_vfont}, + {"rna_volume.c", NULL, RNA_def_volume}, {"rna_wm.c", "rna_wm_api.c", RNA_def_wm}, {"rna_world.c", NULL, RNA_def_world}, {"rna_movieclip.c", NULL, RNA_def_movieclip}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 6335869ca43..b5661f53fd2 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -81,6 +81,7 @@ const EnumPropertyItem rna_enum_id_type_items[] = { {ID_SPK, "SPEAKER", ICON_SPEAKER, "Speaker", ""}, {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, + {ID_VO, "VOLUME", ICON_VOLUME, "Volume", ""}, {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""}, {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, {0, NULL, 0, NULL, NULL} @@ -175,6 +176,7 @@ short RNA_type_to_ID_code(const StructRNA *type) if (base_type == &RNA_Texture) return ID_TE; if (base_type == &RNA_Text) return ID_TXT; if (base_type == &RNA_VectorFont) return ID_VF; + if (base_type == &RNA_Volume) return ID_VO; if (base_type == &RNA_World) return ID_WO; if (base_type == &RNA_WindowManager) return ID_WM; @@ -217,6 +219,7 @@ StructRNA *ID_code_to_RNA_type(short idcode) case ID_TE: return &RNA_Texture; case ID_TXT: return &RNA_Text; case ID_VF: return &RNA_VectorFont; + case ID_VO: return &RNA_Volume; case ID_WM: return &RNA_WindowManager; case ID_WO: return &RNA_World; diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 675ed42a6d2..32d7489446e 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -508,6 +508,12 @@ static void rna_def_dopesheet(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_SPEAKER, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + prop = RNA_def_property(srna, "show_volumes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADS_FILTER_NOVOLUME); /* TODO */ + RNA_def_property_ui_text(prop, "Display Volume", "Include visualization of volume related animation data"); + RNA_def_property_ui_icon(prop, ICON_VOLUME, 0); + RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + prop = RNA_def_property(srna, "show_gpencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOGPENCIL); RNA_def_property_ui_text(prop, "Display Grease Pencil", "Include visualization of Grease Pencil related animation data and frames"); diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 67fbee8d0ef..53b4a8bd4a9 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -185,6 +185,7 @@ void RNA_def_sound(struct BlenderRNA *brna); void RNA_def_ui(struct BlenderRNA *brna); void RNA_def_userdef(struct BlenderRNA *brna); void RNA_def_vfont(struct BlenderRNA *brna); +void RNA_def_volume(struct BlenderRNA *brna); void RNA_def_wm(struct BlenderRNA *brna); void RNA_def_world(struct BlenderRNA *brna); void RNA_def_movieclip(struct BlenderRNA *brna); @@ -336,6 +337,7 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop); +void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop); /* ID Properties */ diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 5d7088c952b..afac2bda5ea 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -293,6 +293,12 @@ static void rna_Main_paintcurves_begin(CollectionPropertyIterator *iter, Pointer rna_iterator_listbase_begin(iter, &bmain->paintcurves, NULL); } +static void rna_Main_volumes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) +{ + Main *bmain = (Main *)ptr->data; + rna_iterator_listbase_begin(iter, &bmain->volume, NULL); +} + static void rna_Main_version_get(PointerRNA *ptr, int *value) { Main *bmain = (Main *)ptr->data; @@ -368,6 +374,7 @@ void RNA_def_main(BlenderRNA *brna) {"linestyles", "FreestyleLineStyle", "rna_Main_linestyle_begin", "Line Styles", "Line Style data-blocks", RNA_def_main_linestyles}, {"cache_files", "CacheFile", "rna_Main_cachefiles_begin", "Cache Files", "Cache Files data-blocks", RNA_def_main_cachefiles}, {"paint_curves", "PaintCurve", "rna_Main_paintcurves_begin", "Paint Curves", "Paint Curves data-blocks", RNA_def_main_paintcurves}, + {"volumes", "Volume", "rna_Main_volumes_begin", "Volumes", "Volume data-blocks", RNA_def_main_volumes}, {NULL, NULL, NULL, NULL, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 7d619254e07..455c1d016aa 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -84,6 +84,7 @@ #include "BKE_mask.h" #include "BKE_gpencil.h" #include "BKE_linestyle.h" +#include "BKE_volume.h" #include "DNA_armature_types.h" #include "DNA_camera_types.h" @@ -106,6 +107,7 @@ #include "DNA_movieclip_types.h" #include "DNA_mask_types.h" #include "DNA_gpencil_types.h" +#include "DNA_volume_types.h" #include "ED_screen.h" @@ -227,6 +229,9 @@ static Object *rna_Main_objects_new(Main *bmain, ReportList *reports, const char case ID_AR: type = OB_ARMATURE; break; + case ID_VO: + type = OB_VOLUME; + break; default: { const char *idname; @@ -574,6 +579,16 @@ static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name return linestyle; } +static Volume *rna_Main_volumes_new(Main *bmain, const char *name) +{ + char safe_name[MAX_ID_NAME - 2]; + rna_idname_validate(name, safe_name); + + Volume *volume = BKE_volume_add(bmain, safe_name); + id_us_min(&volume->id); + return volume; +} + /* tag and is_updated functions, all the same */ #define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \ static void rna_Main_##_func_name##_tag(Main *bmain, bool value) { \ @@ -616,6 +631,7 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(masks, mask, ID_MSK) RNA_MAIN_ID_TAG_FUNCS_DEF(linestyle, linestyle, ID_LS) RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles, ID_CF) RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves, ID_PC) +RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volume, ID_VO) #undef RNA_MAIN_ID_TAG_FUNCS_DEF @@ -1928,4 +1944,47 @@ void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_boolean_funcs(prop, "rna_Main_linestyle_is_updated_get", NULL); } +void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + FunctionRNA *func; + PropertyRNA *parm; + PropertyRNA *prop; + + RNA_def_property_srna(cprop, "BlendDataVolumes"); + srna = RNA_def_struct(brna, "BlendDataVolumes", NULL); + RNA_def_struct_sdna(srna, "Main"); + RNA_def_struct_ui_text(srna, "Main Volumes", "Collection of volumes"); + + func = RNA_def_function(srna, "new", "rna_Main_volumes_new"); + RNA_def_function_ui_description(func, "Add a new volume to the main database"); + parm = RNA_def_string(func, "name", "Volume", 0, "", "New name for the data-block"); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + /* return type */ + parm = RNA_def_pointer(func, "volume", "Volume", "", "New volume data-block"); + RNA_def_function_return(func, parm); + + func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_function_ui_description(func, "Remove a volume from the current blendfile"); + parm = RNA_def_pointer(func, "volume", "Volume", "", "Volume to remove"); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + RNA_def_boolean(func, "do_unlink", true, "", + "Unlink all usages of this volume before deleting it " + "(WARNING: will also delete objects instancing that volume data)"); + RNA_def_boolean(func, "do_id_user", true, "", + "Decrement user counter of all datablocks used by this volume data"); + RNA_def_boolean(func, "do_ui_user", true, "", + "Make sure interface does not reference this volume data"); + + func = RNA_def_function(srna, "tag", "rna_Main_volumes_tag"); + parm = RNA_def_boolean(func, "value", 0, "Value", ""); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + + prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_boolean_funcs(prop, "rna_Main_volumes_is_updated_get", NULL); +} + #endif diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 1d62f438047..e188a165ce5 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -140,6 +140,7 @@ const EnumPropertyItem rna_enum_object_type_items[] = { OBTYPE_CU_SURF, {OB_MBALL, "META", 0, "Meta", ""}, OBTYPE_CU_FONT, + {OB_VOLUME, "VOLUME", 0, "Volume", ""}, {0, "", 0, NULL, NULL}, {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, @@ -434,6 +435,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr) case OB_LATTICE: return &RNA_Lattice; case OB_ARMATURE: return &RNA_Armature; case OB_SPEAKER: return &RNA_Speaker; + case OB_VOLUME: return &RNA_Volume; default: return &RNA_ID; } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 813e847aae6..e789fecb188 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3899,6 +3899,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {FILTER_ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Textures", "Show/hide Texture data-blocks"}, {FILTER_ID_TXT, "TEXT", ICON_TEXT, "Texts", "Show/hide Text data-blocks"}, {FILTER_ID_VF, "FONT", ICON_FONT_DATA, "Fonts", "Show/hide Font data-blocks"}, + {FILTER_ID_VO, "VOLUME", ICON_VOLUME_DATA, "Volumes", "Show/hide Volume data-blocks"}, {FILTER_ID_WO, "WORLD", ICON_WORLD_DATA, "Worlds", "Show/hide World data-blocks"}, {0, NULL, 0, NULL, NULL} }; @@ -3910,8 +3911,8 @@ static void rna_def_fileselect_params(BlenderRNA *brna) "ANIMATION", ICON_ANIM_DATA, "Animations", "Show/hide animation data"}, {FILTER_ID_OB | FILTER_ID_GR, "OBJECT", ICON_GROUP, "Objects & Groups", "Show/hide objects and groups"}, - {FILTER_ID_AR | FILTER_ID_CU | FILTER_ID_LT | FILTER_ID_MB | FILTER_ID_ME, - "GEOMETRY", ICON_MESH_DATA, "Geometry", "Show/hide meshes, curves, lattice, armatures and metaballs data"}, + {FILTER_ID_AR | FILTER_ID_CU | FILTER_ID_LT | FILTER_ID_MB | FILTER_ID_ME | FILTER_ID_VO, + "GEOMETRY", ICON_MESH_DATA, "Geometry", "Show/hide meshes, curves, lattice, armatures, metaballs and volume data"}, {FILTER_ID_LS | FILTER_ID_MA | FILTER_ID_NT | FILTER_ID_TE, "SHADING", ICON_MATERIAL_DATA, "Shading", "Show/hide materials, nodetrees, textures and Freestyle's linestyles"}, diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c new file mode 100644 index 00000000000..551dd9915e0 --- /dev/null +++ b/source/blender/makesrna/intern/rna_volume.c @@ -0,0 +1,141 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Jörg Müller. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/makesrna/intern/rna_volume.c + * \ingroup RNA + */ + +#include <stdlib.h> + +#include "RNA_define.h" +#include "RNA_enum_types.h" + +#include "rna_internal.h" + +#include "DNA_volume_types.h" + +#include "BLI_math_base.h" + +#ifdef RNA_RUNTIME + +#include "BKE_volume.h" + +static void rna_VolumeGrid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) +{ +} + +static void rna_Volume_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) +{ + Volume *volume = ptr->data; + BKE_volume_reload(bmain, volume); +} + +static void rna_VolumeGrids_active_grid_index_range( + PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) +{ + Volume *volume = (Volume *)ptr->data; + + *min = 0; + *max = max_ii(0, BLI_listbase_count(&volume->grids) - 1); +} + +static int rna_VolumeGrids_active_grid_index_get(PointerRNA *ptr) +{ + Volume *volume = (Volume *)ptr->data; + return 0; // TODO +} + +static void rna_VolumeGrids_active_grid_index_set(PointerRNA *ptr, int value) +{ + Volume *volume = (Volume *)ptr->data; + // TODO +} + +#else + +static void rna_def_volume_grid(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "VolumeGrid", NULL); + RNA_def_struct_ui_text(srna, "Volume Grid", "3D volume grid"); + RNA_def_struct_ui_icon(srna, ICON_VOLUME); + + prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Name", "Volume grid name"); + RNA_def_property_update(prop, 0, "rna_VolumeGrid_update"); +} + +static void rna_def_volume_grids(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + + RNA_def_property_srna(cprop, "VolumeGrids"); + srna = RNA_def_struct(brna, "VolumeGrids", NULL); + RNA_def_struct_sdna(srna, "Volume"); + RNA_def_struct_ui_text(srna, "Volume Grids", "3D volume grids"); + + prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_funcs(prop, "rna_VolumeGrids_active_grid_index_get", + "rna_VolumeGrids_active_grid_index_set", + "rna_VolumeGrids_active_grid_index_range"); + RNA_def_property_ui_text(prop, "Active Grid Index", "Index of active volume grid"); +} + +static void rna_def_volume(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "Volume", "ID"); + RNA_def_struct_ui_text(srna, "Volume", "Volume data-block for 3D volume grids"); + RNA_def_struct_ui_icon(srna, ICON_VOLUME); + + prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); + RNA_def_property_ui_text(prop, "File Path", "Volume sample file used by this Volume data-block"); + RNA_def_property_update(prop, 0, "rna_Volume_update"); + + prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "packedfile"); + RNA_def_property_ui_text(prop, "Packed File", ""); + + prop = RNA_def_property(srna, "grids", PROP_COLLECTION, PROP_NONE); + RNA_def_property_struct_type(prop, "VolumeGrid"); + RNA_def_property_ui_text(prop, "Grids", "3D volume grids"); + rna_def_volume_grids(brna, prop); + + + /* common */ + rna_def_animdata_common(srna); +} + + +void RNA_def_volume(BlenderRNA *brna) +{ + rna_def_volume_grid(brna); + rna_def_volume(brna); +} + +#endif + |