mirror of
https://github.com/EatTheFuture/compify.git
synced 2025-01-22 08:19:14 -05:00
WIP: bake on every frame of a render.
This commit is contained in:
parent
a62d168b67
commit
0b4661259b
234
__init__.py
234
__init__.py
@ -32,26 +32,19 @@ import math
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
from .names import \
|
||||||
|
compify_mat_name, \
|
||||||
|
compify_baked_texture_name, \
|
||||||
|
MAIN_NODE_NAME, \
|
||||||
|
BAKE_IMAGE_NODE_NAME, \
|
||||||
|
UV_LAYER_NAME
|
||||||
from .node_groups import \
|
from .node_groups import \
|
||||||
ensure_footage_group, \
|
ensure_footage_group, \
|
||||||
ensure_camera_project_group, \
|
ensure_camera_project_group, \
|
||||||
ensure_feathered_square_group
|
ensure_feathered_square_group
|
||||||
from .uv_utils import leftmost_u
|
from .uv_utils import leftmost_u
|
||||||
from .camera_align import camera_align_register, camera_align_unregister
|
from .camera_align import camera_align_register, camera_align_unregister
|
||||||
|
from .bake import Baker
|
||||||
MAIN_NODE_NAME = "Compify Footage"
|
|
||||||
BAKE_IMAGE_NODE_NAME = "Baked Lighting"
|
|
||||||
UV_LAYER_NAME = 'Compify Baked Lighting'
|
|
||||||
|
|
||||||
# Gets the Compify Material name for the active scene.
|
|
||||||
def compify_mat_name(context):
|
|
||||||
return "Compify Footage | " + context.scene.name
|
|
||||||
|
|
||||||
|
|
||||||
# Gets the Compify baked lighting image name for the active scene.
|
|
||||||
def compify_baked_texture_name(context):
|
|
||||||
return "Compify Bake | " + context.scene.name
|
|
||||||
|
|
||||||
|
|
||||||
#========================================================
|
#========================================================
|
||||||
|
|
||||||
@ -109,6 +102,7 @@ class CompifyPanel(bpy.types.Panel):
|
|||||||
#--------
|
#--------
|
||||||
layout.operator("material.compify_prep_scene")
|
layout.operator("material.compify_prep_scene")
|
||||||
layout.operator("material.compify_bake")
|
layout.operator("material.compify_bake")
|
||||||
|
layout.operator("render.compify_render")
|
||||||
|
|
||||||
|
|
||||||
class CompifyCameraPanel(bpy.types.Panel):
|
class CompifyCameraPanel(bpy.types.Panel):
|
||||||
@ -337,13 +331,8 @@ class CompifyBake(bpy.types.Operator):
|
|||||||
bl_label = "Bake Footage Lighting"
|
bl_label = "Bake Footage Lighting"
|
||||||
bl_options = {'UNDO'}
|
bl_options = {'UNDO'}
|
||||||
|
|
||||||
# Operator fields, for keeping track of state during modal operation.
|
|
||||||
_timer = None
|
_timer = None
|
||||||
is_baking = False
|
baker = None
|
||||||
is_done = False
|
|
||||||
proxy_objects = []
|
|
||||||
hide_render_list = {}
|
|
||||||
main_node = None
|
|
||||||
|
|
||||||
# Note: we use a modal technique inspired by this to keep the baking
|
# Note: we use a modal technique inspired by this to keep the baking
|
||||||
# from blocking the UI:
|
# from blocking the UI:
|
||||||
@ -359,149 +348,114 @@ class CompifyBake(bpy.types.Operator):
|
|||||||
and compify_mat_name(context) in bpy.data.materials
|
and compify_mat_name(context) in bpy.data.materials
|
||||||
|
|
||||||
def post(self, scene, context=None):
|
def post(self, scene, context=None):
|
||||||
self.is_baking = False
|
self.baker.post(scene, context)
|
||||||
self.is_done = True
|
|
||||||
|
|
||||||
def cancelled(self, scene, context=None):
|
def cancelled(self, scene, context=None):
|
||||||
self.is_baking = False
|
self.baker.cancelled(scene, context)
|
||||||
self.is_done = True
|
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
# Clear operator fields. Not strictly necessary, since they
|
self.baker = Baker()
|
||||||
# should be cleared at the end of the bake. But just in case.
|
self._timer = context.window_manager.event_timer_add(0.05, window=context.window)
|
||||||
self._timer = None
|
context.window_manager.modal_handler_add(self)
|
||||||
self.is_baking = False
|
return self.baker.execute(context)
|
||||||
self.is_done = False
|
|
||||||
self.proxy_objects = []
|
|
||||||
self.hide_render_list = {}
|
|
||||||
self.main_node = None
|
|
||||||
|
|
||||||
# Misc setup and checks.
|
def modal(self, context, event):
|
||||||
if context.scene.compify_config.geo_collection == None:
|
result = self.baker.modal(context, event)
|
||||||
return {'CANCELLED'}
|
if result == {'FINISHED'} or result == {'CANCELLED'}:
|
||||||
self.proxy_objects = context.scene.compify_config.geo_collection.objects
|
context.window_manager.event_timer_remove(self._timer)
|
||||||
proxy_lights = []
|
return result
|
||||||
if context.scene.compify_config.lights_collection != None:
|
|
||||||
proxy_lights = context.scene.compify_config.lights_collection.objects
|
|
||||||
material = bpy.data.materials[compify_mat_name(context)]
|
|
||||||
self.main_node = material.node_tree.nodes[MAIN_NODE_NAME]
|
|
||||||
delight_image_node = material.node_tree.nodes[BAKE_IMAGE_NODE_NAME]
|
|
||||||
|
|
||||||
if len(self.proxy_objects) == 0:
|
|
||||||
return {'CANCELLED'}
|
|
||||||
|
|
||||||
# Ensure we have an image of the right resolution to bake to.
|
class CompifyRender(bpy.types.Operator):
|
||||||
bake_image_name = compify_baked_texture_name(context)
|
"""Render, but with Compify baking before rendering each frame."""
|
||||||
bake_res = context.scene.compify_config.bake_image_res
|
bl_idname = "render.compify_render"
|
||||||
if bake_image_name in bpy.data.images \
|
bl_label = "Render with Compify Lighting Integration"
|
||||||
and bpy.data.images[bake_image_name].resolution[0] != bake_res:
|
|
||||||
bpy.data.images.remove(bpy.data.images[bake_image_name])
|
|
||||||
|
|
||||||
bake_image = None
|
_timer = None
|
||||||
if bake_image_name in bpy.data.images:
|
render_started = False
|
||||||
bake_image = bpy.data.images[bake_image_name]
|
render_done = False
|
||||||
else:
|
frame_range = None
|
||||||
bake_image = bpy.data.images.new(
|
stage = ""
|
||||||
bake_image_name,
|
baker = None
|
||||||
bake_res, bake_res,
|
|
||||||
alpha=False,
|
|
||||||
float_buffer=True,
|
|
||||||
stereo3d=False,
|
|
||||||
is_data=False,
|
|
||||||
tiled=False,
|
|
||||||
)
|
|
||||||
delight_image_node.image = bake_image
|
|
||||||
|
|
||||||
# Configure the material for baking mode.
|
is_finished = False
|
||||||
self.main_node.inputs["Do Bake"].default_value = 1.0
|
is_cancelled = False
|
||||||
self.main_node.inputs["Debug"].default_value = 0.0
|
|
||||||
delight_image_node.select = True
|
|
||||||
material.node_tree.nodes.active = delight_image_node
|
|
||||||
|
|
||||||
# Deselect everything.
|
@classmethod
|
||||||
for obj in context.scene.objects:
|
def poll(cls, context):
|
||||||
obj.select_set(False)
|
return context.mode == 'OBJECT' \
|
||||||
|
and context.scene.compify_config.footage != None \
|
||||||
|
and context.scene.compify_config.camera != None \
|
||||||
|
and context.scene.compify_config.geo_collection != None \
|
||||||
|
and len(context.scene.compify_config.geo_collection.all_objects) > 0 \
|
||||||
|
and compify_mat_name(context) in bpy.data.materials
|
||||||
|
|
||||||
# Build a dictionary of the visibility of non-proxy objects so that
|
def render_post_callback(self, scene, context=None):
|
||||||
# we can restore it afterwards.
|
self.render_done = True
|
||||||
for obj in context.scene.objects:
|
|
||||||
if obj.name not in self.proxy_objects and obj.name not in proxy_lights:
|
|
||||||
self.hide_render_list[obj.name] = obj.hide_render
|
|
||||||
|
|
||||||
# Make all non-proxy objects invisible.
|
def cancelled_callback(self, scene, context=None):
|
||||||
for obj_name in self.hide_render_list:
|
self.is_cancelled = True
|
||||||
bpy.data.objects[obj_name].hide_render = True
|
|
||||||
|
|
||||||
# Set up the baking job event handlers.
|
def execute(self, context):
|
||||||
bpy.app.handlers.object_bake_complete.append(self.post)
|
self.render_started = False
|
||||||
bpy.app.handlers.object_bake_cancel.append(self.cancelled)
|
self.render_done = False
|
||||||
|
self.frame_range = (context.scene.frame_start, context.scene.frame_end)
|
||||||
|
self.stage = "bake"
|
||||||
|
self.baker = Baker()
|
||||||
|
|
||||||
|
self.is_finished = False
|
||||||
|
self.is_cancelled = False
|
||||||
|
|
||||||
|
bpy.app.handlers.render_post.append(self.render_post_callback)
|
||||||
|
bpy.app.handlers.render_cancel.append(self.cancelled_callback)
|
||||||
|
bpy.app.handlers.object_bake_cancel.append(self.cancelled_callback)
|
||||||
|
|
||||||
# Set up the timer.
|
|
||||||
self._timer = context.window_manager.event_timer_add(0.05, window=context.window)
|
self._timer = context.window_manager.event_timer_add(0.05, window=context.window)
|
||||||
context.window_manager.modal_handler_add(self)
|
context.window_manager.modal_handler_add(self)
|
||||||
|
|
||||||
|
context.scene.frame_set(self.frame_range[0])
|
||||||
|
|
||||||
return {'RUNNING_MODAL'}
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
|
|
||||||
def modal(self, context, event):
|
def modal(self, context, event):
|
||||||
if event.type == 'TIMER':
|
if self.is_cancelled or self.is_finished:
|
||||||
if not self.is_baking and not self.is_done:
|
bpy.app.handlers.render_post.remove(self.render_post_callback)
|
||||||
self.is_baking = True
|
bpy.app.handlers.render_cancel.remove(self.cancelled_callback)
|
||||||
|
bpy.app.handlers.object_bake_cancel.remove(self.cancelled_callback)
|
||||||
|
|
||||||
# Select objects for baking.
|
if self.is_cancelled:
|
||||||
for obj in self.proxy_objects:
|
return {'CANCELLED'}
|
||||||
obj.select_set(True)
|
|
||||||
context.view_layer.objects.active = self.proxy_objects[0]
|
|
||||||
|
|
||||||
# Do the bake.
|
|
||||||
bpy.ops.object.bake(
|
|
||||||
"INVOKE_DEFAULT",
|
|
||||||
type='DIFFUSE',
|
|
||||||
pass_filter={'DIRECT', 'INDIRECT', 'COLOR'},
|
|
||||||
# filepath='',
|
|
||||||
# width=512,
|
|
||||||
# height=512,
|
|
||||||
margin=context.scene.compify_config.bake_uv_margin,
|
|
||||||
margin_type='EXTEND',
|
|
||||||
use_selected_to_active=False,
|
|
||||||
max_ray_distance=0.0,
|
|
||||||
cage_extrusion=0.0,
|
|
||||||
cage_object='',
|
|
||||||
normal_space='TANGENT',
|
|
||||||
normal_r='POS_X',
|
|
||||||
normal_g='POS_Y',
|
|
||||||
normal_b='POS_Z',
|
|
||||||
target='IMAGE_TEXTURES',
|
|
||||||
save_mode='INTERNAL',
|
|
||||||
use_clear=True,
|
|
||||||
use_cage=False,
|
|
||||||
use_split_materials=False,
|
|
||||||
use_automatic_name=False,
|
|
||||||
uv_layer='',
|
|
||||||
)
|
|
||||||
elif self.is_done:
|
|
||||||
# Clean up the handlers and timer.
|
|
||||||
context.window_manager.event_timer_remove(self._timer)
|
|
||||||
bpy.app.handlers.object_bake_complete.remove(self.post)
|
|
||||||
bpy.app.handlers.object_bake_cancel.remove(self.cancelled)
|
|
||||||
self._timer = None
|
|
||||||
|
|
||||||
# Restore visibility of non-proxy objects.
|
|
||||||
for obj_name in self.hide_render_list:
|
|
||||||
bpy.data.objects[obj_name].hide_render = self.hide_render_list[obj_name]
|
|
||||||
self.hide_render_list = {}
|
|
||||||
|
|
||||||
# Set material to non-bake mode.
|
|
||||||
self.main_node.inputs["Do Bake"].default_value = 0.0
|
|
||||||
self.main_node = None
|
|
||||||
|
|
||||||
# Reset other self properties.
|
|
||||||
self.is_baking = False
|
|
||||||
self.is_done = False
|
|
||||||
self.proxy_objects = []
|
|
||||||
|
|
||||||
|
if self.is_finished:
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
if event.type == 'TIMER':
|
||||||
|
# Bake stage.
|
||||||
|
if self.stage == "bake":
|
||||||
|
if not self.baker.is_baking and not self.baker.is_done:
|
||||||
|
self.baker.execute(context)
|
||||||
|
result = self.baker.modal(context, event)
|
||||||
|
if result == {'FINISHED'}:
|
||||||
|
self.baker.reset()
|
||||||
|
self.stage = "render"
|
||||||
|
else:
|
||||||
|
if result == {'CANCELLED'}:
|
||||||
|
self.is_cancelled = True
|
||||||
|
return result
|
||||||
|
# Render stage.
|
||||||
|
elif self.stage == "render":
|
||||||
|
if not self.render_started:
|
||||||
|
self.render_started = True
|
||||||
|
bpy.ops.render.render("INVOKE_DEFAULT", animation=False, write_still=True)
|
||||||
|
elif self.render_done:
|
||||||
|
if context.scene.frame_current >= self.frame_range[1]:
|
||||||
|
self.is_finished = True
|
||||||
|
else:
|
||||||
|
context.scene.frame_set(context.scene.frame_current + 1)
|
||||||
|
self.render_started = False
|
||||||
|
self.render_done = False
|
||||||
|
self.stage = "bake"
|
||||||
|
|
||||||
return {'PASS_THROUGH'}
|
return {'PASS_THROUGH'}
|
||||||
|
|
||||||
|
|
||||||
@ -607,6 +561,7 @@ def register():
|
|||||||
bpy.utils.register_class(CompifyAddFootageLightsCollection)
|
bpy.utils.register_class(CompifyAddFootageLightsCollection)
|
||||||
bpy.utils.register_class(CompifyPrepScene)
|
bpy.utils.register_class(CompifyPrepScene)
|
||||||
bpy.utils.register_class(CompifyBake)
|
bpy.utils.register_class(CompifyBake)
|
||||||
|
bpy.utils.register_class(CompifyRender)
|
||||||
bpy.utils.register_class(CompifyCameraProjectGroupNew)
|
bpy.utils.register_class(CompifyCameraProjectGroupNew)
|
||||||
bpy.utils.register_class(CompifyFootageConfig)
|
bpy.utils.register_class(CompifyFootageConfig)
|
||||||
|
|
||||||
@ -623,6 +578,7 @@ def unregister():
|
|||||||
bpy.utils.unregister_class(CompifyAddFootageLightsCollection)
|
bpy.utils.unregister_class(CompifyAddFootageLightsCollection)
|
||||||
bpy.utils.unregister_class(CompifyPrepScene)
|
bpy.utils.unregister_class(CompifyPrepScene)
|
||||||
bpy.utils.unregister_class(CompifyBake)
|
bpy.utils.unregister_class(CompifyBake)
|
||||||
|
bpy.utils.unregister_class(CompifyRender)
|
||||||
bpy.utils.unregister_class(CompifyCameraProjectGroupNew)
|
bpy.utils.unregister_class(CompifyCameraProjectGroupNew)
|
||||||
bpy.utils.unregister_class(CompifyFootageConfig)
|
bpy.utils.unregister_class(CompifyFootageConfig)
|
||||||
|
|
||||||
|
159
bake.py
Normal file
159
bake.py
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
import bpy
|
||||||
|
|
||||||
|
from .names import \
|
||||||
|
compify_mat_name, \
|
||||||
|
compify_baked_texture_name, \
|
||||||
|
MAIN_NODE_NAME, \
|
||||||
|
BAKE_IMAGE_NODE_NAME, \
|
||||||
|
UV_LAYER_NAME
|
||||||
|
from .node_groups import \
|
||||||
|
ensure_footage_group, \
|
||||||
|
ensure_camera_project_group, \
|
||||||
|
ensure_feathered_square_group
|
||||||
|
from .uv_utils import leftmost_u
|
||||||
|
from .camera_align import camera_align_register, camera_align_unregister
|
||||||
|
|
||||||
|
class Baker:
|
||||||
|
def __init__(self):
|
||||||
|
self.is_baking = False
|
||||||
|
self.is_done = False
|
||||||
|
self.proxy_objects = []
|
||||||
|
self.hide_render_list = {}
|
||||||
|
self.main_node = None
|
||||||
|
|
||||||
|
def post(self, scene, context=None):
|
||||||
|
self.is_baking = False
|
||||||
|
self.is_done = True
|
||||||
|
|
||||||
|
def cancelled(self, scene, context=None):
|
||||||
|
self.is_baking = False
|
||||||
|
self.is_done = True
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
# Misc setup and checks.
|
||||||
|
if context.scene.compify_config.geo_collection == None:
|
||||||
|
return {'CANCELLED'}
|
||||||
|
self.proxy_objects = context.scene.compify_config.geo_collection.objects
|
||||||
|
proxy_lights = []
|
||||||
|
if context.scene.compify_config.lights_collection != None:
|
||||||
|
proxy_lights = context.scene.compify_config.lights_collection.objects
|
||||||
|
material = bpy.data.materials[compify_mat_name(context)]
|
||||||
|
self.main_node = material.node_tree.nodes[MAIN_NODE_NAME]
|
||||||
|
delight_image_node = material.node_tree.nodes[BAKE_IMAGE_NODE_NAME]
|
||||||
|
|
||||||
|
if len(self.proxy_objects) == 0:
|
||||||
|
return {'CANCELLED'}
|
||||||
|
|
||||||
|
# Ensure we have an image of the right resolution to bake to.
|
||||||
|
bake_image_name = compify_baked_texture_name(context)
|
||||||
|
bake_res = context.scene.compify_config.bake_image_res
|
||||||
|
if bake_image_name in bpy.data.images \
|
||||||
|
and bpy.data.images[bake_image_name].resolution[0] != bake_res:
|
||||||
|
bpy.data.images.remove(bpy.data.images[bake_image_name])
|
||||||
|
|
||||||
|
bake_image = None
|
||||||
|
if bake_image_name in bpy.data.images:
|
||||||
|
bake_image = bpy.data.images[bake_image_name]
|
||||||
|
else:
|
||||||
|
bake_image = bpy.data.images.new(
|
||||||
|
bake_image_name,
|
||||||
|
bake_res, bake_res,
|
||||||
|
alpha=False,
|
||||||
|
float_buffer=True,
|
||||||
|
stereo3d=False,
|
||||||
|
is_data=False,
|
||||||
|
tiled=False,
|
||||||
|
)
|
||||||
|
delight_image_node.image = bake_image
|
||||||
|
|
||||||
|
# Configure the material for baking mode.
|
||||||
|
self.main_node.inputs["Do Bake"].default_value = 1.0
|
||||||
|
self.main_node.inputs["Debug"].default_value = 0.0
|
||||||
|
delight_image_node.select = True
|
||||||
|
material.node_tree.nodes.active = delight_image_node
|
||||||
|
|
||||||
|
# Deselect everything.
|
||||||
|
for obj in context.scene.objects:
|
||||||
|
obj.select_set(False)
|
||||||
|
|
||||||
|
# Build a dictionary of the visibility of non-proxy objects so that
|
||||||
|
# we can restore it afterwards.
|
||||||
|
for obj in context.scene.objects:
|
||||||
|
if obj.name not in self.proxy_objects and obj.name not in proxy_lights:
|
||||||
|
self.hide_render_list[obj.name] = obj.hide_render
|
||||||
|
|
||||||
|
# Make all non-proxy objects invisible.
|
||||||
|
for obj_name in self.hide_render_list:
|
||||||
|
bpy.data.objects[obj_name].hide_render = True
|
||||||
|
|
||||||
|
# Set up the baking job event handlers.
|
||||||
|
bpy.app.handlers.object_bake_complete.append(self.post)
|
||||||
|
bpy.app.handlers.object_bake_cancel.append(self.cancelled)
|
||||||
|
|
||||||
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
|
|
||||||
|
def modal(self, context, event):
|
||||||
|
if event.type == 'TIMER':
|
||||||
|
if not self.is_baking and not self.is_done:
|
||||||
|
self.is_baking = True
|
||||||
|
|
||||||
|
# Select objects for baking.
|
||||||
|
for obj in self.proxy_objects:
|
||||||
|
obj.select_set(True)
|
||||||
|
context.view_layer.objects.active = self.proxy_objects[0]
|
||||||
|
|
||||||
|
# Do the bake.
|
||||||
|
bpy.ops.object.bake(
|
||||||
|
"INVOKE_DEFAULT",
|
||||||
|
type='DIFFUSE',
|
||||||
|
pass_filter={'DIRECT', 'INDIRECT', 'COLOR'},
|
||||||
|
# filepath='',
|
||||||
|
# width=512,
|
||||||
|
# height=512,
|
||||||
|
margin=context.scene.compify_config.bake_uv_margin,
|
||||||
|
margin_type='EXTEND',
|
||||||
|
use_selected_to_active=False,
|
||||||
|
max_ray_distance=0.0,
|
||||||
|
cage_extrusion=0.0,
|
||||||
|
cage_object='',
|
||||||
|
normal_space='TANGENT',
|
||||||
|
normal_r='POS_X',
|
||||||
|
normal_g='POS_Y',
|
||||||
|
normal_b='POS_Z',
|
||||||
|
target='IMAGE_TEXTURES',
|
||||||
|
save_mode='INTERNAL',
|
||||||
|
use_clear=True,
|
||||||
|
use_cage=False,
|
||||||
|
use_split_materials=False,
|
||||||
|
use_automatic_name=False,
|
||||||
|
uv_layer='',
|
||||||
|
)
|
||||||
|
elif self.is_done:
|
||||||
|
# Clean up the handlers and timer.
|
||||||
|
bpy.app.handlers.object_bake_complete.remove(self.post)
|
||||||
|
bpy.app.handlers.object_bake_cancel.remove(self.cancelled)
|
||||||
|
self._timer = None
|
||||||
|
|
||||||
|
# Restore visibility of non-proxy objects.
|
||||||
|
for obj_name in self.hide_render_list:
|
||||||
|
bpy.data.objects[obj_name].hide_render = self.hide_render_list[obj_name]
|
||||||
|
self.hide_render_list = {}
|
||||||
|
|
||||||
|
# Set material to non-bake mode.
|
||||||
|
self.main_node.inputs["Do Bake"].default_value = 0.0
|
||||||
|
self.main_node = None
|
||||||
|
|
||||||
|
# Reset other self properties.
|
||||||
|
self.is_baking = False
|
||||||
|
self.is_done = False
|
||||||
|
self.proxy_objects = []
|
||||||
|
|
||||||
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
return {'PASS_THROUGH'}
|
||||||
|
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.is_baking = False
|
||||||
|
self.is_done = False
|
12
names.py
Normal file
12
names.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
MAIN_NODE_NAME = "Compify Footage"
|
||||||
|
BAKE_IMAGE_NODE_NAME = "Baked Lighting"
|
||||||
|
UV_LAYER_NAME = 'Compify Baked Lighting'
|
||||||
|
|
||||||
|
# Gets the Compify Material name for the active scene.
|
||||||
|
def compify_mat_name(context):
|
||||||
|
return "Compify Footage | " + context.scene.name
|
||||||
|
|
||||||
|
|
||||||
|
# Gets the Compify baked lighting image name for the active scene.
|
||||||
|
def compify_baked_texture_name(context):
|
||||||
|
return "Compify Bake | " + context.scene.name
|
Loading…
Reference in New Issue
Block a user