Skip to content

Commit

Permalink
Merge branch 'niftools_master' into niftools_develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Candoran2 committed Nov 3, 2023
2 parents 8d0ab34 + c649495 commit d54b428
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ Fork

.. code-block:: shell
git clone --recursive git://github.com/niftools/blender_niftools_addon.git
git clone --recursive https://github.com/niftools/blender_niftools_addon.git
Please check `this temporary guide <https://github.com/niftools/blender_niftools_addon/issues/566#issuecomment-1566743313>`_ for building the ``generated`` module.
4 changes: 4 additions & 0 deletions docs/development/setup/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Environment Variables
set -X BLENDER_ADDONS_DIR=<path_to_blender_addons>
BLENDER_HOME="<path_to_blender_executable>"
.. note::

If you've installed Blender from the package manager, just set it to ``/usr/bin``.

**Mac**

.. code-block:: shell
Expand Down
1 change: 1 addition & 0 deletions install/makezip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ echo "Creating dependencies folder ${DEPS_OUT:-${BUILD_DIR}/dependencies}"
python -m pip install "PyFFI==${PYFFI_VERSION}" --target="${DEPS_OUT:-${BUILD_DIR}/dependencies}"

echo "Copying loose files"
cp -r "$GENERATED_FOLDER" "${DEPS_OUT:-${BUILD_DIR}/dependencies}/generated"
cp "${ROOT}"/AUTHORS.rst "${ADDON_OUT}"
cp "${ROOT}"/CHANGELOG.rst "${ADDON_OUT}"
cp "${ROOT}"/LICENSE.rst "${ADDON_OUT}"
Expand Down
5 changes: 4 additions & 1 deletion io_scene_niftools/modules/nif_export/animation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ def __init__(self):

def set_flags_and_timing(self, kfc, exp_fcurves, start_frame=None, stop_frame=None):
# fill in the non-trivial values
kfc.flags = 8 # active
kfc.flags._value = 8 # active
kfc.flags |= self.get_flags_from_fcurves(exp_fcurves)
if bpy.context.scene.niftools_scene.game == 'SID_MEIER_S_PIRATES':
# Sid Meier's Pirates! want the manager_controlled flag set
kfc.flags.manager_controlled = True
kfc.frequency = 1.0
kfc.phase = 0.0
if not start_frame and not stop_frame:
Expand Down
4 changes: 3 additions & 1 deletion io_scene_niftools/modules/nif_export/animation/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def export_kf_root(self, b_armature=None):
kf_root = block_store.create_block("NiSequenceStreamHelper")
elif nif_scene.is_bs() or game in (
'CIVILIZATION_IV', 'ZOO_TYCOON_2', 'FREEDOM_FORCE_VS_THE_3RD_REICH',
'SHIN_MEGAMI_TENSEI_IMAGINE'):
'SHIN_MEGAMI_TENSEI_IMAGINE', 'SID_MEIER_S_PIRATES'):
kf_root = block_store.create_block("NiControllerSequence")
else:
raise NifError(f"Keyframe export for '{game}' is not supported.")
Expand Down Expand Up @@ -110,6 +110,8 @@ def export_kf_root(self, b_armature=None):
kf_root.weight = 1.0
kf_root.cycle_type = NifClasses.CycleType.CYCLE_CLAMP
kf_root.frequency = 1.0
if game in ('SID_MEIER_S_PIRATES',):
kf_root.accum_root_name = targetname

if anim_textextra.num_text_keys > 0:
kf_root.start_time = anim_textextra.text_keys[0].time
Expand Down

0 comments on commit d54b428

Please sign in to comment.