Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mistafunk committed Oct 5, 2020
2 parents 04363af + d3ffb47 commit a65e1f7
Show file tree
Hide file tree
Showing 64 changed files with 2,133 additions and 1,569 deletions.
17 changes: 17 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BasedOnStyle: LLVM

AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
BraceWrapping:
BeforeCatch: true
BeforeElse: true
BreakBeforeBraces: Custom
ColumnLimit: 120
ContinuationIndentWidth: 8
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
PointerAlignment: Left
TabWidth: 4
UseTab: ForIndentation
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2014-2019 Esri R&D Zurich and VRBN
Copyright 2014-2020 Esri R&D Zurich and VRBN

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

*Binaries and examples are available at https://esri.github.io/palladio*

Palladio is a plugin for [SideFX Houdini](https://www.sidefx.com). It provides operator nodes which enable the execution of [Esri CityEngine](http://www.esri.com/software/cityengine) ‘rules’ within Houdini networks. Therefore, a 3D environment artist does not have to leave their familiar Houdini toolset anymore to make use of CityEngine’s procedural modeling power. Complicated export-import pipelines are no longer needed, which also means that the procedural building models do not need to be “baked” anymore. The buildings stay procedural during the entire modeling workflow (optionally even at render time). Consequently, the 3D environment artist can change the height, style and appearance of buildings easily with a parametric interface at any point during production.
Palladio is a plugin for [SideFX Houdini](https://www.sidefx.com). It provides operator nodes which enable the execution of [CityEngine](http://www.esri.com/software/cityengine) ‘rules’ within Houdini networks. Therefore, a 3D environment artist does not have to leave their familiar Houdini toolset anymore to make use of CityEngine’s procedural modeling power. Complicated export-import pipelines are no longer needed, which also means that the procedural building models do not need to be “baked” anymore. The buildings stay procedural during the entire modeling workflow (optionally even at render time). Consequently, the 3D environment artist can change the height, style and appearance of buildings easily with a parametric interface at any point during production.

Palladio requires so-called rule packages (RPK) as input, which are authored in CityEngine. An RPK includes assets and a CGA rule file which encodes an architectural style. Comprehensive RPK examples are available below and can be used “out-of-the-box” in Palladio.

Expand Down
5 changes: 3 additions & 2 deletions conan/cesdk/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from conans import ConanFile
from conans import tools

from conans.model.version import Version

class CESDKConan(ConanFile):
name = "cesdk"
Expand All @@ -12,7 +12,8 @@ class CESDKConan(ConanFile):

def build(self):
if self.settings.os == "Windows":
url = self.baseURL.format(self.version, self.version, "win10", "vc141")
toolchain = "vc142" if self.version >= Version("2.2.6332") else "vc141"
url = self.baseURL.format(self.version, self.version, "win10", toolchain)
elif self.settings.os == "Linux":
url = self.baseURL.format(self.version, self.version, "rhel7", "gcc63")
elif self.settings.os == "Macos":
Expand Down
112 changes: 84 additions & 28 deletions conan/conan-0.14.cmake → conan/conan-0.15.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# but it is only necessary on the end-user side. It is not necessary to create conan
# packages, in fact it shouldn't be use for that. Check the project documentation.

# version: 0.15.0

include(CMakeParseArguments)

Expand Down Expand Up @@ -157,8 +158,8 @@ function(conan_cmake_settings result)
set(_CONAN_SETTING_COMPILER clang)
set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
if(APPLE)
cmake_policy(GET CMP0025 APPLE_CLANG_POLICY_ENABLED)
if(NOT APPLE_CLANG_POLICY_ENABLED)
cmake_policy(GET CMP0025 APPLE_CLANG_POLICY)
if(NOT APPLE_CLANG_POLICY STREQUAL NEW)
message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
set(_CONAN_SETTING_COMPILER apple-clang)
endif()
Expand Down Expand Up @@ -220,7 +221,7 @@ function(conan_cmake_settings result)
endif()

foreach(ARG ${_APPLIED_PROFILES})
set(_SETTINGS ${_SETTINGS} -pr ${ARG})
set(_SETTINGS ${_SETTINGS} -pr=${ARG})
endforeach()

if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")
Expand Down Expand Up @@ -298,14 +299,16 @@ function(conan_cmake_detect_vs_runtime result)
string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
foreach(variable ${variables})
string(REPLACE " " ";" flags ${${variable}})
foreach (flag ${flags})
if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd")
string(SUBSTRING ${flag} 1 -1 runtime)
set(${result} ${runtime} PARENT_SCOPE)
return()
endif()
endforeach()
if(NOT "${${variable}}" STREQUAL "")
string(REPLACE " " ";" flags ${${variable}})
foreach (flag ${flags})
if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd")
string(SUBSTRING ${flag} 1 -1 runtime)
set(${result} ${runtime} PARENT_SCOPE)
return()
endif()
endforeach()
endif()
endforeach()
if(${build_type} STREQUAL "DEBUG")
set(${result} "MDd" PARENT_SCOPE)
Expand All @@ -316,11 +319,11 @@ endfunction()


macro(parse_arguments)
set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS)
set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS SKIP_STD)
set(oneValueArgs CONANFILE ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO
INSTALL_ARGS)
INSTALL_ARGS CONFIGURATION_TYPES)
cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
endmacro()

Expand Down Expand Up @@ -348,9 +351,9 @@ function(conan_cmake_install)
endif()
endforeach()
if(ARGUMENTS_CONAN_COMMAND)
set(conan_command ${ARGUMENTS_CONAN_COMMAND})
set(CONAN_CMD ${ARGUMENTS_CONAN_COMMAND})
else()
set(conan_command conan)
conan_check(REQUIRED)
endif()
set(CONAN_OPTIONS "")
if(ARGUMENTS_CONANFILE)
Expand Down Expand Up @@ -381,16 +384,16 @@ function(conan_cmake_install)
set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS})

string (REPLACE ";" " " _conan_args "${conan_args}")
message(STATUS "Conan executing: ${conan_command} ${_conan_args}")
message(STATUS "Conan executing: ${CONAN_CMD} ${_conan_args}")

if(ARGUMENTS_OUTPUT_QUIET)
execute_process(COMMAND ${conan_command} ${conan_args}
execute_process(COMMAND ${CONAN_CMD} ${conan_args}
RESULT_VARIABLE return_code
OUTPUT_VARIABLE conan_output
ERROR_VARIABLE conan_output
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
else()
execute_process(COMMAND ${conan_command} ${conan_args}
execute_process(COMMAND ${CONAN_CMD} ${conan_args}
RESULT_VARIABLE return_code
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()
Expand All @@ -407,7 +410,7 @@ function(conan_cmake_setup_conanfile)
if(ARGUMENTS_CONANFILE)
get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME)
# configure_file will make sure cmake re-runs when conanfile is updated
configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk COPYONLY)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
else()
conan_cmake_generate_conanfile(${ARGV})
Expand Down Expand Up @@ -462,10 +465,19 @@ endmacro()

macro(conan_cmake_run)
parse_arguments(${ARGV})

if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES)
message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators")
elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE)
message(WARNING "CONFIGURATION_TYPES and BUILD_TYPE arguments should not be defined at the same time.")
endif()

if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED
AND NOT ARGUMENTS_BUILD_TYPE)
set(CONAN_CMAKE_MULTI ON)
if (NOT ARGUMENTS_CONFIGURATION_TYPES)
set(ARGUMENTS_CONFIGURATION_TYPES "Release;Debug")
endif()
message(STATUS "Conan: Using cmake-multi generator")
else()
set(CONAN_CMAKE_MULTI OFF)
Expand All @@ -474,7 +486,7 @@ macro(conan_cmake_run)
if(NOT CONAN_EXPORTED)
conan_cmake_setup_conanfile(${ARGV})
if(CONAN_CMAKE_MULTI)
foreach(CMAKE_BUILD_TYPE "Release" "Debug")
foreach(CMAKE_BUILD_TYPE ${ARGUMENTS_CONFIGURATION_TYPES})
set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE})
conan_cmake_settings(settings ${ARGV})
conan_cmake_install(SETTINGS ${settings} ${ARGV})
Expand All @@ -487,11 +499,11 @@ macro(conan_cmake_run)
endif()

if (NOT ARGUMENTS_NO_LOAD)
conan_load_buildinfo()
conan_load_buildinfo()
endif()

if(ARGUMENTS_BASIC_SETUP)
foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS)
foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS SKIP_STD)
if(ARGUMENTS_${_option})
if(${_option} STREQUAL "CMAKE_TARGETS")
list(APPEND _setup_options "TARGETS")
Expand All @@ -509,7 +521,7 @@ macro(conan_check)
# Arguments REQUIRED and VERSION are optional
# Example usage:
# conan_check(VERSION 1.0.0 REQUIRED)
message(STATUS "Conan: checking conan executable in path")
message(STATUS "Conan: checking conan executable")
set(options REQUIRED)
set(oneValueArgs VERSION)
cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN})
Expand All @@ -535,20 +547,64 @@ macro(conan_check)
endif()
endmacro()

macro(conan_add_remote)
function(conan_add_remote)
# Adds a remote
# Arguments URL and NAME are required, INDEX is optional
# Arguments URL and NAME are required, INDEX and COMMAND are optional
# Example usage:
# conan_add_remote(NAME bincrafters INDEX 1
# URL https://api.bintray.com/conan/bincrafters/public-conan)
set(oneValueArgs URL NAME INDEX)
set(oneValueArgs URL NAME INDEX COMMAND)
cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})

if(DEFINED CONAN_INDEX)
set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}")
endif()

message(STATUS "Conan: Adding ${CONAN_NAME} remote repositoy (${CONAN_URL})")
if(CONAN_COMMAND)
set(CONAN_CMD ${CONAN_COMMAND})
else()
conan_check(REQUIRED)
endif()
message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL})")
execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
${CONAN_INDEX_ARG} -f)
endfunction()

macro(conan_config_install)
# install a full configuration from a local or remote zip file
# Argument ITEM is required, arguments TYPE, SOURCE, TARGET and VERIFY_SSL are optional
# Example usage:
# conan_config_install(ITEM https://github.com/conan-io/cmake-conan.git
# TYPE git SOURCE source-folder TARGET target-folder VERIFY_SSL false)
set(oneValueArgs ITEM TYPE SOURCE TARGET VERIFY_SSL)
set(multiValueArgs ARGS)
cmake_parse_arguments(CONAN "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(CONAN_CONFIG_INSTALL_ARGS "")

find_program(CONAN_CMD conan)
if(NOT CONAN_CMD AND CONAN_REQUIRED)
message(FATAL_ERROR "Conan executable not found!")
endif()

if(DEFINED CONAN_VERIFY_SSL)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --verify-ssl ${CONAN_VERIFY_SSL}")
endif()

if(DEFINED CONAN_TYPE)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --type ${CONAN_TYPE}")
endif()

if(DEFINED CONAN_ARGS)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --args \"${CONAN_ARGS}\"")
endif()

if(DEFINED CONAN_SOURCE)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --source-folder ${CONAN_SOURCE}")
endif()

if(DEFINED CONAN_TARGET)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --target-folder ${CONAN_TARGET}")
endif()

message(STATUS "Conan: Installing config from ${CONAN_ITEM}")
execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_CONFIG_INSTALL_ARGS} ${CONAN_ITEM})
endmacro()
41 changes: 23 additions & 18 deletions conan/houdini/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from conans import ConanFile
from conans.model.version import Version
from conans.errors import ConanInvalidConfiguration
import os


class HoudiniConan(ConanFile):
name = "houdini"
settings = "os", "compiler", "arch"
Expand All @@ -9,32 +12,34 @@ class HoudiniConan(ConanFile):
license = "SIDE EFFECTS SOFTWARE LICENSE AGREEMENT, https://www.sidefx.com/legal/license-agreement"
short_paths = True

houdiniDefaultInstallationPath = r'C:\Program Files\Side Effects Software\Houdini {}'
local_houdini_installation = ""

def build(self):
pass
proto_installation_path = r'C:\Program Files\Side Effects Software\Houdini {}' \
if self.settings.os == "Windows" else "/opt/hfs{}"
self.local_houdini_installation = os.getenv(
'HOUDINI_INSTALL') if 'HOUDINI_INSTALL' in os.environ else proto_installation_path.format(self.version)
if not os.path.exists(self.local_houdini_installation):
raise ConanInvalidConfiguration("Invalid Houdini installation path: {}".format(self.local_houdini_installation))

def package(self):
self.copy("bin/*", ".", self.local_houdini_installation) # needed for sesitag etc
self.copy("toolkit/*", ".", self.local_houdini_installation)
if self.settings.os == "Windows":
local_install = os.getenv('HOUDINI_INSTALL')\
if 'HOUDINI_INSTALL' in os.environ\
else self.houdiniDefaultInstallationPath.format(self.version)
self.copy("bin/*", ".", local_install) # needed for sesitag etc
self.copy("custom/*", ".", local_install)
self.copy("toolkit/*", ".", local_install)
self.copy("custom/*", ".", self.local_houdini_installation)
elif self.settings.os == "Linux":
local_install = os.getenv('HOUDINI_INSTALL')\
if 'HOUDINI_INSTALL' in os.environ\
else "/opt/hfs{}".format(self.version)
self.copy("houdini_setup*", ".", local_install) # needed for sesitag etc
self.copy("bin/*", ".", local_install) # needed for sesitag etc
self.copy("dsolib/*", ".", local_install)
self.copy("toolkit/*", ".", local_install)
self.copy("houdini/Licensing.opt", ".", local_install)
else:
raise Exception("platform not supported!")
self.copy("houdini_setup*", ".", self.local_houdini_installation) # needed for sesitag etc
self.copy("dsolib/*", ".", self.local_houdini_installation)
self.copy("houdini/Licensing.opt", ".", self.local_houdini_installation)

def package_info(self):
self.cpp_info.libdirs = ['dsolib']
self.cpp_info.libs = ['HoudiniUI', 'HoudiniOPZ', 'HoudiniOP3', 'HoudiniOP2',
'HoudiniOP1', 'HoudiniGEO', 'HoudiniPRM', 'HoudiniUT']

def package_id(self):
v = Version(str(self.settings.compiler.version))
if self.settings.compiler == "Visual Studio" and ("15" <= v <= "16"):
self.info.settings.compiler.version = "Compatible with MSVC 14.1 and 14.2"
elif self.settings.compiler == "gcc" and ("6" <= v < "9"):
self.info.settings.compiler.version = "Compatible with GCC 6 tru 8"
15 changes: 15 additions & 0 deletions conan/profiles/windows-v142
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.version=16
compiler.runtime=MD

[options]

[build_requires]

[env]
6 changes: 3 additions & 3 deletions doc/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

### Supported Operating Systems
* RedHat Enterprise Linux 7 (and compatible)
* Windows 7/8.1/10
* Windows 10

### Required Toolchain & Compiler
* [cmake 3.13 or later](https://cmake.org/download)
* [conan 1.20 or later](https://www.conan.io/downloads)
* Linux: GCC 6.3
* Windows: Visual Studio 2017 (MSVC 14.1)
* Windows: Visual Studio 2019 (MSVC 14.2)

### Required Build Dependencies
* Installation of Houdini 17.0 or later (see https://sidefx.com/download)

The following will be automatically fetched via the bootstrap steps below:
* [Esri CityEngine SDK](https://github.com/Esri/esri-cityengine-sdk)
* [CityEngine SDK](https://github.com/esri/cityengine-sdk)
* SideFX Houdini HDK


Expand Down
Loading

0 comments on commit a65e1f7

Please sign in to comment.