[Bf-blender-cvs] [6ac4add] alembic_pointcache: Moved remaining state variables of the PointCache DNA struct into the PointCacheState struct.
Lukas Tönne
noreply at git.blender.org
Thu Oct 16 16:53:52 CEST 2014
Commit: 6ac4add2ccb95b6ce0705761c097176fbe547cd8
Author: Lukas Tönne
Date: Sat Nov 30 17:16:52 2013 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB6ac4add2ccb95b6ce0705761c097176fbe547cd8
Moved remaining state variables of the PointCache DNA struct into the
PointCacheState struct.
===================================================================
M release/scripts/startup/bl_ui/properties_particle.py
M release/scripts/startup/bl_ui/properties_physics_cloth.py
M release/scripts/startup/bl_ui/properties_physics_common.py
M release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M release/scripts/startup/bl_ui/properties_physics_smoke.py
M release/scripts/startup/bl_ui/properties_physics_softbody.py
M release/scripts/startup/bl_ui/properties_scene.py
M source/blender/blenkernel/intern/cloth.c
M source/blender/blenkernel/intern/particle_system.c
M source/blender/blenkernel/intern/pointcache.c
M source/blender/blenkernel/intern/rigidbody.c
M source/blender/blenkernel/intern/smoke.c
M source/blender/blenkernel/intern/softbody.c
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/space_time/space_time.c
M source/blender/makesdna/DNA_pointcache_types.h
M source/blender/makesrna/intern/rna_pointcache.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 743a58a..051bbeb 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -36,7 +36,7 @@ def particle_panel_enabled(context, psys):
if psys.settings.type in {'EMITTER', 'REACTOR'} and phystype in {'NO', 'KEYED'}:
return True
else:
- return (psys.point_cache.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable)
+ return (psys.point_cache.state.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable)
def particle_panel_poll(cls, context):
@@ -278,7 +278,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
cloth = psys.cloth.settings
- layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False
+ layout.enabled = psys.use_hair_dynamics and psys.point_cache.state.is_baked is False
split = layout.split()
@@ -319,7 +319,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
phystype = psys.settings.physics_type
if phystype == 'NO' or phystype == 'KEYED':
return False
- return (psys.settings.type in {'EMITTER', 'REACTOR'} or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES
+ return (psys.settings.type in {'EMITTER', 'REACTOR'} or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.state.is_baked))) and engine in cls.COMPAT_ENGINES
def draw(self, context):
psys = context.particle_system
@@ -840,7 +840,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col.label(text="Timing:")
col.prop(part, "use_absolute_path_time")
- if part.type == 'HAIR' or psys.point_cache.is_baked:
+ if part.type == 'HAIR' or psys.point_cache.state.is_baked:
col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
else:
col.prop(part, "trail_count")
@@ -1009,11 +1009,11 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
if part.draw_percentage != 100 and psys is not None:
if part.type == 'HAIR':
- if psys.use_hair_dynamics and psys.point_cache.is_baked is False:
+ if psys.use_hair_dynamics and psys.point_cache.state.is_baked is False:
layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
else:
phystype = part.physics_type
- if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked is False:
+ if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.state.is_baked is False:
layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
row = layout.row()
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 91b4cc0..915a5b5 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -25,7 +25,7 @@ from bl_ui.properties_physics_common import (point_cache_ui,
def cloth_panel_enabled(md):
- return md.point_cache.is_baked is False
+ return md.point_cache.state.is_baked is False
class CLOTH_MT_presets(Menu):
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index ad92158..85d4794 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -126,7 +126,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
sub.prop(cache, "index", text="")
col.prop(cache, "filepath", text="")
- cache_info = cache.info
+ cache_info = cache.state.info
if cache_info:
layout.label(text=cache_info)
else:
@@ -148,7 +148,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
row.prop(cache, "frame_step")
if cachetype != 'SMOKE':
- layout.label(text=cache.info)
+ layout.label(text=cache.state.info)
can_bake = True
@@ -169,13 +169,13 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
col = split.column()
- if cache.is_baked is True:
+ if cache.state.is_baked is True:
col.operator("ptcache.free_bake", text="Free Bake")
else:
col.operator("ptcache.bake", text="Bake").bake = True
sub = col.row()
- sub.enabled = (cache.frames_skipped or cache.is_outdated) and enabled
+ sub.enabled = (cache.state.frames_skipped or cache.state.is_outdated) and enabled
sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
sub = col.column()
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 093da00..d5f47bf 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -405,7 +405,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
cache = surface.point_cache
- point_cache_ui(self, context, cache, (cache.is_baked is False), 'DYNAMIC_PAINT')
+ point_cache_ui(self, context, cache, (cache.state.is_baked is False), 'DYNAMIC_PAINT')
class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 5bdbbd7..93d7e86 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -52,7 +52,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
split = layout.split()
- split.enabled = not domain.point_cache.is_baked
+ split.enabled = not domain.point_cache.state.is_baked
col = split.column()
col.label(text="Resolution:")
@@ -174,7 +174,7 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
domain = context.smoke.domain_settings
split = layout.split()
- split.enabled = not domain.point_cache.is_baked
+ split.enabled = not domain.point_cache.state.is_baked
col = split.column(align=True)
col.label(text="Reaction:")
@@ -210,7 +210,7 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
layout.active = domain.use_adaptive_domain
split = layout.split()
- split.enabled = (not domain.point_cache.is_baked)
+ split.enabled = (not domain.point_cache.state.is_baked)
col = split.column(align=True)
col.label(text="Resolution:")
@@ -245,7 +245,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
layout.active = md.use_high_resolution
split = layout.split()
- split.enabled = not md.point_cache.is_baked
+ split.enabled = not md.point_cache.state.is_baked
col = split.column()
col.label(text="Resolution:")
@@ -308,7 +308,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
layout.label(text="Compression:")
layout.prop(md, "point_cache_compress_type", expand=True)
- point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
+ point_cache_ui(self, context, cache, (cache.state.is_baked is False), 'SMOKE')
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index 79d6765..d4f2930 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -25,7 +25,7 @@ from bl_ui.properties_physics_common import (point_cache_ui,
def softbody_panel_enabled(md):
- return (md.point_cache.is_baked is False)
+ return (md.point_cache.state.is_baked is False)
class PhysicButtonsPanel():
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 10574c8..17c437f 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -306,7 +306,7 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):
scene = context.scene
rbw = scene.rigidbody_world
- point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY')
+ point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.state.is_baked is False and rbw.enabled, 'RIGID_BODY')
class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 6a9e488..ea183f4 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -476,7 +476,7 @@ void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, Derived
cache->state.flag |= PTC_STATE_OUTDATED;
BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
BKE_ptcache_validate(cache, 0);
- cache->last_exact= 0;
+ cache->state.last_exact= 0;
cache->state.flag &= ~PTC_STATE_REDO_NEEDED;
}
@@ -550,10 +550,10 @@ void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, Derived
return;
/* if on second frame, write cache for first frame */
- if (cache->simframe == startframe && (cache->state.flag & PTC_STATE_OUTDATED || cache->last_exact==0))
+ if (cache->state.simframe == startframe && (cache->state.flag & PTC_STATE_OUT
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list